﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;
using System.Collections.Generic;//Please add references
namespace EnterpriseFund.DAL
{
    /// <summary>
    /// 数据访问类:DJ_NSRXX
    /// </summary>
    public partial class DJ_NSRXX
    {
        public DJ_NSRXX()
        { }
        #region  BasicMethod

        public DataSet GetShowList(string strWhere, string strWhere2,string year,string strwhere3)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"SELECT a.NSRDZDAH,a.NSRBM,a.NSRSBH,a.NSRMC,a.FEnterprisePropName,a.FFinancePropName,a.GS_NSRSBH,a.GS_NSRMC,a.FDDBRMC,a.DHHM,a.SCJYDZ,se FROM (SELECT * FROM fund.fn_DJ_NSRXX(" + year + @") where " + strwhere3 + @") a LEFT JOIN (
                                   SELECT NSRDZDAH,isnull(SUM(isnull(SE,0)),0) AS se FROM fund.V_SB_ZSXX  r ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
                strSql.Append(" and ZSXM_DM in (select FTaxClassNo from fund.t_TaxClassAllowance where FYear=YEAR(RKRQ))");
            }
            strSql.Append(" GROUP BY NSRDZDAH) b ON a.NSRDZDAH = b.NSRDZDAH");
            if (strWhere2.Trim() != "")
            {
                strSql.Append(" where " + strWhere2);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(decimal fyear, string noList, string type, string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from fund.fn_DJ_NSRXX(" + fyear + ") ");
            if (type != "3")
            {
                strSql.Append(" where  NSRDZDAH in (" + noList + ") and (FFinancePropNo is not null or FEnterprisePropNo is not null )");
            }
            else
            {
                strSql = new StringBuilder();
                strSql.Append(@"SELECT count(1) FROM fund.fn_DJ_NSRXX(" + fyear + @") a LEFT JOIN (
                                   SELECT NSRDZDAH,SUM(SE) AS se FROM fund.V_SB_ZSXX  ");
                if (strWhere.Trim() != "")
                {
                    strSql.Append(" where " + strWhere);
                }
                strSql.Append(" GROUP BY NSRDZDAH) b ON a.NSRDZDAH = b.NSRDZDAH");
                if (noList.Trim() != "")
                {
                    strSql.Append(" where " + noList);
                    strSql.Append(" and (FFinancePropNo is not null or FEnterprisePropNo is not null )");
                }
                else
                {
                    strSql.Append(" (FFinancePropNo is not null or FEnterprisePropNo is not null )");
                }
               
            }
            object obj = DbHelperSQL.GetSingle(strSql.ToString());
            if (obj != null)
            {
                if ((int)obj > 0)
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            else
            {
                return false;
            }
        }
        
        /// <summary>
        /// 根据查询条件获取纳税人电子档案号
        /// </summary>
        /// <param name="fyear"></param>
        /// <param name="strwhere"></param>
        /// <returns></returns>
        public List<string> GetDzdah(string fyear,string strwhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select NSRDZDAH from fund.fn_DJ_NSRXX(" + fyear + ") ");

            strSql.Append(" where " + strwhere);

            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            List<string> noList = new List<string>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                noList.Add(ds.Tables[0].Rows[i]["NSRDZDAH"].ToString());
            }
            return noList;
        }

        public void ImportData(string strwhere="1=1",int outTimes=60*60)
        {
            StringBuilder strSql = new StringBuilder();
            List<CommandInfo> commandInfoList = new List<CommandInfo>();
            CommandInfo commandInfo = new CommandInfo();
            SqlParameter[] parameters = new SqlParameter[] { };

            SqlConnection conn = new SqlConnection(DbHelperSQL.connectionString);
            conn.Open();
            SqlTransaction tran = conn.BeginTransaction();
            SqlCommand command = new SqlCommand();
            command.CommandTimeout = outTimes;

            try
            {

                strSql = new StringBuilder();
                strSql.Append("TRUNCATE TABLE  ltais.DJ_NSRXX_KZ ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("TRUNCATE TABLE ltais.DJ_NSRXX ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("TRUNCATE TABLE ltais.DJ_YHXX ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("select count(*) ");
                strSql.Append(" FROM DJ_NSRXX where " + strwhere);
                object count = DbHelperOra.GetSingle(strSql.ToString());
                int sumCount = 0;
                int temp = 0;
                if (count != null)
                {
                    sumCount = int.Parse(count.ToString());
                }
                for (int i = 0; i < sumCount / 5000; i++)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM from ( select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM, rownum r ");
                    strSql.Append(" FROM DJ_NSRXX where "+ strwhere+") where r >=" + (i * 5000 + 1) + " and r <=" + ((i + 1) * 5000));
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                    temp = ((i + 1) * 5000);
                }

                if (sumCount < 5000)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM from ( select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM , rownum r ");
                    strSql.Append(" FROM DJ_NSRXX where " + strwhere + ")");
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                if (sumCount > temp)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM from ( select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM , rownum r ");
                    strSql.Append(" FROM DJ_NSRXX where " + strwhere + ") where r >=" + (temp + 1) + " and r <=" + (sumCount));
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                strSql = new StringBuilder();
                strSql.Append("select count(*) ");
                strSql.Append(" FROM DJ_NSRXX_KZ where " + strwhere);
                count = DbHelperOra.GetSingle(strSql.ToString());
                sumCount = 0;
                if (count != null)
                {
                    sumCount = int.Parse(count.ToString());
                }

                for (int i = 0; i < sumCount / 5000; i++)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select NSRDZDAH,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ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CQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH, rownum r  ");
                    strSql.Append(" FROM DJ_NSRXX_KZ where " + strwhere + ") where r >=" + (i * 5000 + 1) + " and r <=" + ((i + 1) * 5000));
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX_KZ";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);

                    temp = ((i + 1) * 5000);
                }

                if (sumCount < 5000)
                {
                    DataSet ds =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DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX_KZ";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                if (sumCount > temp)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select NSRDZDAH,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_D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LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH, rownum r   ");
                    strSql.Append(" FROM DJ_NSRXX_KZ  where " + strwhere + ") where r >=" + (temp + 1) + " and r <=" + (sumCount) + " ");
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_NSRXX_KZ";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                


                strSql = new StringBuilder();
                strSql.Append("select count(*) ");
                strSql.Append(" FROM DJ_YHXX where " + strwhere);
                count = DbHelperOra.GetSingle(strSql.ToString());
                sumCount = 0;
                temp = 0;
                if (count != null)
                {
                    sumCount = int.Parse(count.ToString());
                }

                for (int i = 0; i < sumCount / 5000; i++)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH from (select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH, rownum r   ");
                    strSql.Append(" FROM DJ_YHXX  where " + strwhere + ")  where r >=" + (i * 5000 + 1) + " and r <=" + ((i + 1) * 5000) + " and yxbz='Y' ");
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_YHXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                    temp = ((i + 1) * 5000);
                }

                if (sumCount < 5000)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH from ( select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH, rownum r   ");
                    strSql.Append(" FROM DJ_YHXX  where " + strwhere + ") where yxbz='Y'");
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_YHXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                if (sumCount > temp)
                {
                    DataSet ds = new DataSet();
                    strSql = new StringBuilder();
                    strSql.Append("select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH from ( select XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH, rownum r   ");
                    strSql.Append(" FROM DJ_YHXX  where " + strwhere + ") where r >=" + (temp + 1) + " and r <=" + (sumCount) + " and yxbz='Y'");
                    ds = DbHelperOra.Query(strSql.ToString());

                    SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    sqlbulkcopy.DestinationTableName = "ltais.DJ_YHXX";//数据库中的表名
                    sqlbulkcopy.BulkCopyTimeout = outTimes;
                    sqlbulkcopy.WriteToServer(ds.Tables[0]);
                }

                tran.Commit();
            }
            catch (Exception ex)
            {
                tran.Rollback();
                throw ex;
            }
            finally
            {
                conn.Close();
            }
        }

        ///// <summary>
        ///// 数据导入
        ///// </summary>
        ///// <param name="list1"></param>
        ///// <param name="list2"></param>
        //public void ImportData(List<Model.DSDJ_NSRXX> list1 ,List<Model.DSDJ_NSRXX_KZ> list2, List<Model.DJ_YHXX> DJ_YHXXList)
        //{

        //    StringBuilder strSql = new StringBuilder();
        //    CommandInfo cmds = new CommandInfo();
        //    List<CommandInfo> cmdList = new List<CommandInfo>();

        //    strSql.Append("TRUNCATE TABLE  ltais.DJ_NSRXX_KZ ");
        //    SqlParameter[] parameters = new SqlParameter[] { new SqlParameter() };
        //    cmds.CommandText = strSql.ToString();
        //    cmds.Parameters = parameters;
        //    cmdList.Add(cmds);

        //    strSql = new StringBuilder();
        //    cmds = new CommandInfo();
        //    strSql.Append("TRUNCATE TABLE  ltais.DJ_NSRXX ");
        //    SqlParameter[] parameters2 = new SqlParameter[] { new SqlParameter() };
        //    cmds.CommandText = strSql.ToString();
        //    cmds.Parameters = parameters2;
        //    cmdList.Add(cmds);


        //    strSql = new StringBuilder();
        //    cmds = new CommandInfo();
        //    strSql.Append("TRUNCATE TABLE  ltais.DJ_YHXX ");
        //    SqlParameter[] parameters5 = new SqlParameter[] { new SqlParameter() };
        //    cmds.CommandText = strSql.ToString();
        //    cmds.Parameters = parameters5;
        //    cmdList.Add(cmds);

        //    foreach (Model.DSDJ_NSRXX model1 in list1)
        //    {
        //        cmds = new CommandInfo();
        //        strSql = new StringBuilder();
        //        strSql.Append("insert into ltais.DJ_NSRXX(");
        //        strSql.Append("NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM)");
        //        strSql.Append(" values (");
        //        strSql.Append("@NSRDZDAH,@WSPZXH,@NSRSBH,@NSRBM,@NSRMC,@FDDBRMC,@FRZJLX_DM,@ZJHM,@SCJYDZ,@BSRMC,@DHHM,@LSGX_DM,@HY_DM,@DJZCLX_DM,@HZDJRQ,@QYKJZD_DM,@SWDJBLX_DM,@SWDJZLX_DM,@NSRZT_DM,@ZGSWRY_DM,@JDXZ_DM,@ZZSNSRLX_DM,@GSYLB_DM,@NSRXYDJ_DM,@QYGM_DM,@CYLX_DM,@XZQH_YSFPBL_DM,@HGDM,@ZJG_BZ,@NSR_SWJG_DM,@SWJG_DM,@LRR_DM,@LRRQ,@XGR_DM,@XGRQ,@HDFS_DM,@DSZ,@NSRMC_JC,@ZJL,@QYFR_DM,@FZDW_MC,@FZHM,@JYFS_DM,@NSRLB_DM,@GDGGBZ,@KGFS_DM,@HYDL_DM,@BF_SJQYXZ_DM)");
        //        SqlParameter[] parameters3 = {
        //            new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
        //            new SqlParameter("@WSPZXH", SqlDbType.Decimal,13),
        //            new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20),
        //            new SqlParameter("@NSRBM", SqlDbType.NVarChar,20),
        //            new SqlParameter("@NSRMC", SqlDbType.NVarChar,80),
        //            new SqlParameter("@FDDBRMC", SqlDbType.NVarChar,100),
        //            new SqlParameter("@FRZJLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@ZJHM", SqlDbType.NVarChar,20),
        //            new SqlParameter("@SCJYDZ", SqlDbType.NVarChar,400),
        //            new SqlParameter("@BSRMC", SqlDbType.NVarChar,20),
        //            new SqlParameter("@DHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@LSGX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HY_DM", SqlDbType.NVarChar,4),
        //            new SqlParameter("@DJZCLX_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@HZDJRQ", SqlDbType.DateTime),
        //            new SqlParameter("@QYKJZD_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@SWDJBLX_DM", SqlDbType.NVarChar,1),
        //            new SqlParameter("@SWDJZLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@NSRZT_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@ZGSWRY_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@JDXZ_DM", SqlDbType.NVarChar,10),
        //            new SqlParameter("@ZZSNSRLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@GSYLB_DM", SqlDbType.NVarChar,1),
        //            new SqlParameter("@NSRXYDJ_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@QYGM_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@CYLX_DM", SqlDbType.NVarChar,1),
        //            new SqlParameter("@XZQH_YSFPBL_DM", SqlDbType.NVarChar,6),
        //            new SqlParameter("@HGDM", SqlDbType.NVarChar,30),
        //            new SqlParameter("@ZJG_BZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRRQ", SqlDbType.DateTime),
        //            new SqlParameter("@XGR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@XGRQ", SqlDbType.DateTime),
        //            new SqlParameter("@HDFS_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@DSZ", SqlDbType.NVarChar,80),
        //            new SqlParameter("@NSRMC_JC", SqlDbType.NVarChar,80),
        //            new SqlParameter("@ZJL", SqlDbType.NVarChar,80),
        //            new SqlParameter("@QYFR_DM", SqlDbType.NVarChar,80),
        //            new SqlParameter("@FZDW_MC", SqlDbType.NVarChar,80),
        //            new SqlParameter("@FZHM", SqlDbType.NVarChar,80),
        //            new SqlParameter("@JYFS_DM", SqlDbType.NVarChar,100),
        //            new SqlParameter("@NSRLB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@GDGGBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@KGFS_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HYDL_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@BF_SJQYXZ_DM", SqlDbType.NVarChar,2)};
        //        parameters3[0].Value = model1.NSRDZDAH;
        //        parameters3[1].Value = model1.WSPZXH;
        //        parameters3[2].Value = model1.NSRSBH;
        //        parameters3[3].Value = model1.NSRBM;
        //        parameters3[4].Value = model1.NSRMC;
        //        parameters3[5].Value = model1.FDDBRMC;
        //        parameters3[6].Value = model1.FRZJLX_DM;
        //        parameters3[7].Value = model1.ZJHM;
        //        parameters3[8].Value = model1.SCJYDZ;
        //        parameters3[9].Value = model1.BSRMC;
        //        parameters3[10].Value = model1.DHHM;
        //        parameters3[11].Value = model1.LSGX_DM;
        //        parameters3[12].Value = model1.HY_DM;
        //        parameters3[13].Value = model1.DJZCLX_DM;
        //        parameters3[14].Value = model1.HZDJRQ;
        //        parameters3[15].Value = model1.QYKJZD_DM;
        //        parameters3[16].Value = model1.SWDJBLX_DM;
        //        parameters3[17].Value = model1.SWDJZLX_DM;
        //        parameters3[18].Value = model1.NSRZT_DM;
        //        parameters3[19].Value = model1.ZGSWRY_DM;
        //        parameters3[20].Value = model1.JDXZ_DM;
        //        parameters3[21].Value = model1.ZZSNSRLX_DM;
        //        parameters3[22].Value = model1.GSYLB_DM;
        //        parameters3[23].Value = model1.NSRXYDJ_DM;
        //        parameters3[24].Value = model1.QYGM_DM;
        //        parameters3[25].Value = model1.CYLX_DM;
        //        parameters3[26].Value = model1.XZQH_YSFPBL_DM;
        //        parameters3[27].Value = model1.HGDM;
        //        parameters3[28].Value = model1.ZJG_BZ;
        //        parameters3[29].Value = model1.NSR_SWJG_DM;
        //        parameters3[30].Value = model1.SWJG_DM;
        //        parameters3[31].Value = model1.LRR_DM;
        //        parameters3[32].Value = model1.LRRQ;
        //        parameters3[33].Value = model1.XGR_DM;
        //        parameters3[34].Value = model1.XGRQ;
        //        parameters3[35].Value = model1.HDFS_DM;
        //        parameters3[36].Value = model1.DSZ;
        //        parameters3[37].Value = model1.NSRMC_JC;
        //        parameters3[38].Value = model1.ZJL;
        //        parameters3[39].Value = model1.QYFR_DM;
        //        parameters3[40].Value = model1.FZDW_MC;
        //        parameters3[41].Value = model1.FZHM;
        //        parameters3[42].Value = model1.JYFS_DM;
        //        parameters3[43].Value = model1.NSRLB_DM;
        //        parameters3[44].Value = model1.GDGGBZ;
        //        parameters3[45].Value = model1.KGFS_DM;
        //        parameters3[46].Value = model1.HYDL_DM;
        //        parameters3[47].Value = model1.BF_SJQYXZ_DM;
        //        cmds.CommandText = strSql.ToString();
        //        cmds.Parameters = parameters2;
        //        cmdList.Add(cmds);
        //    }

        //    foreach (Model.DSDJ_NS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Q,@ZCZB_ZE,@ZCZBB,@ZCBZB_DM,@ZCZBC,@ZCBZC_DM,@KHDJZH,@DJZFZRQ,@WCBYY_DM,@QYTSBZ_DM,@DLFQ_DM,@DAH,@PQ_DM,@NSRTSZTLX_DM,@ZFXYH,@QXSDSGXJG,@BY_NSRSBH)");
        //        SqlParameter[] parameters4 = {
        //            new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
        //            new SqlParameter("@NSRMC_YW", SqlDbType.NVarChar,80),
        //            new SqlParameter("@GSHBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@FRBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@ZCDZ", SqlDbType.NVarChar,400),
        //            new SqlParameter("@ZCD_YB", SqlDbType.NVarChar,6),
        //            new SqlParameter("@SCJYD_YB", SqlDbType.NVarChar,6),
        //            new SqlParameter("@DYDZ", SqlDbType.NVarChar,30),
        //            new SqlParameter("@GSKYRQ", SqlDbType.DateTime),
        //            new SqlParameter("@HSXS_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@BSR_ZJLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@BSR_ZJHM", SqlDbType.NVarChar,20),
        //            new SqlParameter("@JSJDJDM", SqlDbType.NVarChar,9),
        //            new SqlParameter("@GSDJJG_MC", SqlDbType.NVarChar,60),
        //            new SqlParameter("@ZZLB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@GSDJZZH", SqlDbType.NVarChar,50),
        //            new SqlParameter("@YXQ_Q", SqlDbType.DateTime),
        //            new SqlParameter("@YXQ_Z", SqlDbType.DateTime),
        //            new SqlParameter("@ZY", SqlDbType.NVarChar,4000),
        //            new SqlParameter("@JY", SqlDbType.NVarChar,4000),
        //            new SqlParameter("@JYFS", SqlDbType.NVarChar,100),
        //            new SqlParameter("@SCJYQX_Q", SqlDbType.DateTime),
        //            new SqlParameter("@SCJYQX_Z", SqlDbType.DateTime),
        //            new SqlParameter("@GSFZRQ", SqlDbType.DateTime),
        //            new SqlParameter("@ZCZB", SqlDbType.Decimal,9),
        //            new SqlParameter("@ZCBZ_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@TZZE", SqlDbType.Decimal,9),
        //            new SqlParameter("@TZBZ_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@CYRS", SqlDbType.BigInt,8),
        //            new SqlParameter("@WJRS", SqlDbType.BigInt,8),
        //            new SqlParameter("@YZZZ", SqlDbType.NVarChar,80),
        //            new SqlParameter("@ZGDW", SqlDbType.NVarChar,80),
        //            new SqlParameter("@JYFWDW", SqlDbType.NVarChar,80),
        //            new SqlParameter("@ZJGYB", SqlDbType.NVarChar,30),
        //            new SqlParameter("@PZJG", SqlDbType.NVarChar,80),
        //            new SqlParameter("@PZWH", SqlDbType.NVarChar,50),
        //            new SqlParameter("@PZRQ", SqlDbType.DateTime),
        //            new SqlParameter("@ZHZCQK", SqlDbType.NVarChar,250),
        //            new SqlParameter("@CJQ_Q", SqlDbType.DateTime),
        //            new SqlParameter("@CJQ_Z", SqlDbType.DateTime),
        //            new SqlParameter("@HWCFC", SqlDbType.NVarChar,80),
        //            new SqlParameter("@HWCFDMJ", SqlDbType.NVarChar,20),
        //            new SqlParameter("@CWFZRMC", SqlDbType.NVarChar,80),
        //            new SqlParameter("@CWBBZL", SqlDbType.NVarChar,120),
        //            new SqlParameter("@GDZCZJFS", SqlDbType.NVarChar,80),
        //            new SqlParameter("@YHPTXFF", SqlDbType.NVarChar,80),
        //            new SqlParameter("@KJND", SqlDbType.NVarChar,30),
        //            new SqlParameter("@JZBWB_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@JZLB", SqlDbType.NVarChar,1),
        //            new SqlParameter("@JZFS", SqlDbType.NVarChar,1),
        //            new SqlParameter("@JZRQ", SqlDbType.SmallInt,2),
        //            new SqlParameter("@FZRQ", SqlDbType.DateTime),
        //            new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRRQ", SqlDbType.DateTime),
        //            new SqlParameter("@XGR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@XGRQ", SqlDbType.DateTime),
        //            new SqlParameter("@FRGJ_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@TZFS_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@JYMS_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HJLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@SBDJZH", SqlDbType.NVarChar,20),
        //            new SqlParameter("@HYML_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@ZJFL_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@DSBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@NSFS_DM", SqlDbType.NVarChar,8),
        //            new SqlParameter("@FRXB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@FRZW", SqlDbType.NVarChar,90),
        //            new SqlParameter("@FRNL", SqlDbType.Int,4),
        //            new SqlParameter("@FRDH", SqlDbType.NVarChar,60),
        //            new SqlParameter("@CWFZRXB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@CWFZRZW", SqlDbType.NVarChar,90),
        //            new SqlParameter("@CWFZRNL", SqlDbType.Int,4),
        //            new SqlParameter("@CWFZRDH", SqlDbType.NVarChar,60),
        //            new SqlParameter("@CWFZRSFHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@BSRYXB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@BSRYZW", SqlDbType.NVarChar,90),
        //            new SqlParameter("@BSRYNL", SqlDbType.Int,4),
        //            new SqlParameter("@BSRYDH", SqlDbType.NVarChar,60),
        //            new SqlParameter("@DWXZ", SqlDbType.NVarChar,60),
        //            new SqlParameter("@WANGZHI", SqlDbType.NVarChar,60),
        //            new SqlParameter("@FRGJ_DZ", SqlDbType.NVarChar,60),
        //            new SqlParameter("@ZCD_DHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@SCD_DHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@HHR_ZS", SqlDbType.BigInt,8),
        //            new SqlParameter("@FR_YDDHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@BSR_YDDHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@BSR_DYDZ", SqlDbType.NVarChar,60),
        //            new SqlParameter("@CW_YDDHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@CW_ZJLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@CW_DYDZ", SqlDbType.NVarChar,60),
        //            new SqlParameter("@SWDLR_MC", SqlDbType.NVarChar,60),
        //            new SqlParameter("@SWDLR_SBH", SqlDbType.NVarChar,20),
        //            new SqlParameter("@SWDLR_DHHM", SqlDbType.NVarChar,60),
        //            new SqlParameter("@SWDLR_DYDZ", SqlDbType.NVarChar,60),
        //            new SqlParameter("@ZRRTZBL", SqlDbType.Float,8),
        //            new SqlParameter("@WZTZBL", SqlDbType.Float,8),
        //            new SqlParameter("@GYTZBL", SqlDbType.Float,8),
        //            new SqlParameter("@HYDLB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HYDLC_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HYDLD_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@HYB_DM", SqlDbType.NVarChar,6),
        //            new SqlParameter("@HYC_DM", SqlDbType.NVarChar,6),
        //            new SqlParameter("@HYD_DM", SqlDbType.NVarChar,6),
        //            new SqlParameter("@LSNSRLX_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@LSNSR_YXQ", SqlDbType.NVarChar,10),
        //            new SqlParameter("@ZCZB_ZE", SqlDbType.Decimal,9),
        //            new SqlParameter("@ZCZBB", SqlDbType.Decimal,9),
        //            new SqlParameter("@ZCBZB_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@ZCZBC", SqlDbType.Decimal,9),
        //            new SqlParameter("@ZCBZC_DM", SqlDbType.NVarChar,3),
        //            new SqlParameter("@KHDJZH", SqlDbType.NVarChar,80),
        //            new SqlParameter("@DJZFZRQ", SqlDbType.DateTime),
        //            new SqlParameter("@WCBYY_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@QYTSBZ_DM", SqlDbType.NVarChar,50),
        //            new SqlParameter("@DLFQ_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@DAH", SqlDbType.NVarChar,20),
        //            new SqlParameter("@PQ_DM", SqlDbType.Decimal,13),
        //            new SqlParameter("@NSRTSZTLX_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@ZFXYH", SqlDbType.NVarChar,100),
        //            new SqlParameter("@QXSDSGXJG", SqlDbType.NVarChar,1),
        //            new SqlParameter("@BY_NSRSBH", SqlDbType.NVarChar,20)};
        //        parameters4[0].Value = model2.NSRDZDAH;
        //        parameters4[1].Value = model2.NSRMC_YW;
        //        parameters4[2].Value = model2.GSHBZ;
        //        parameters4[3].Value = model2.FRBZ;
        //        parameters4[4].Value = model2.ZCDZ;
        //        parameters4[5].Value = model2.ZCD_YB;
        //        parameters4[6].Value = model2.SCJYD_YB;
        //        parameters4[7].Value = model2.DYDZ;
        //        parameters4[8].Value = model2.GSKYRQ;
        //        parameters4[9].Value = model2.HSXS_DM;
        //        parameters4[10].Value = model2.BSR_ZJLX_DM;
        //        parameters4[11].Value = model2.BSR_ZJHM;
        //        parameters4[12].Value = model2.JSJDJDM;
        //        parameters4[13].Value = model2.GSDJJG_MC;
        //        parameters4[14].Value = model2.ZZLB_DM;
        //        parameters4[15].Value = model2.GSDJZZH;
        //        parameters4[16].Value = model2.YXQ_Q;
        //        parameters4[17].Value = model2.YXQ_Z;
        //        parameters4[18].Value = model2.ZY;
        //        parameters4[19].Value = model2.JY;
        //        parameters4[20].Value = model2.JYFS;
        //        parameters4[21].Value = model2.SCJYQX_Q;
        //        parameters4[22].Value = model2.SCJYQX_Z;
        //        parameters4[23].Value = model2.GSFZRQ;
        //        parameters4[24].Value = model2.ZCZB;
        //        parameters4[25].Value = model2.ZCBZ_DM;
        //        parameters4[26].Value = model2.TZZE;
        //        parameters4[27].Value = model2.TZBZ_DM;
        //        parameters4[28].Value = model2.CYRS;
        //        parameters4[29].Value = model2.WJRS;
        //        parameters4[30].Value = model2.YZZZ;
        //        parameters4[31].Value = model2.ZGDW;
        //        parameters4[32].Value = model2.JYFWDW;
        //        parameters4[33].Value = model2.ZJGYB;
        //        parameters4[34].Value = model2.PZJG;
        //        parameters4[35].Value = model2.PZWH;
        //        parameters4[36].Value = model2.PZRQ;
        //        parameters4[37].Value = model2.ZHZCQK;
        //        parameters4[38].Value = model2.CJQ_Q;
        //        parameters4[39].Value = model2.CJQ_Z;
        //        parameters4[40].Value = model2.HWCFC;
        //        parameters4[41].Value = model2.HWCFDMJ;
        //        parameters4[42].Value = model2.CWFZRMC;
        //        parameters4[43].Value = model2.CWBBZL;
        //        parameters4[44].Value = model2.GDZCZJFS;
        //        parameters4[45].Value = model2.YHPTXFF;
        //        parameters4[46].Value = model2.KJND;
        //        parameters4[47].Value = model2.JZBWB_DM;
        //        parameters4[48].Value = model2.JZLB;
        //        parameters4[49].Value = model2.JZFS;
        //        parameters4[50].Value = model2.JZRQ;
        //        parameters4[51].Value = model2.FZRQ;
        //        parameters4[52].Value = model2.NSR_SWJG_DM;
        //        parameters4[53].Value = model2.SWJG_DM;
        //        parameters4[54].Value = model2.LRR_DM;
        //        parameters4[55].Value = model2.LRRQ;
        //        parameters4[56].Value = model2.XGR_DM;
        //        parameters4[57].Value = model2.XGRQ;
        //        parameters4[58].Value = model2.FRGJ_DM;
        //        parameters4[59].Value = model2.TZFS_DM;
        //        parameters4[60].Value = model2.JYMS_DM;
        //        parameters4[61].Value = model2.HJLX_DM;
        //        parameters4[62].Value = model2.SBDJZH;
        //        parameters4[63].Value = model2.HYML_DM;
        //        parameters4[64].Value = model2.ZJFL_DM;
        //        parameters4[65].Value = model2.DSBZ;
        //        parameters4[66].Value = model2.NSFS_DM;
        //        parameters4[67].Value = model2.FRXB_DM;
        //        parameters4[68].Value = model2.FRZW;
        //        parameters4[69].Value = model2.FRNL;
        //        parameters4[70].Value = model2.FRDH;
        //        parameters4[71].Value = model2.CWFZRXB_DM;
        //        parameters4[72].Value = model2.CWFZRZW;
        //        parameters4[73].Value = model2.CWFZRNL;
        //        parameters4[74].Value = model2.CWFZRDH;
        //        parameters4[75].Value = model2.CWFZRSFHM;
        //        parameters4[76].Value = model2.BSRYXB_DM;
        //        parameters4[77].Value = model2.BSRYZW;
        //        parameters4[78].Value = model2.BSRYNL;
        //        parameters4[79].Value = model2.BSRYDH;
        //        parameters4[80].Value = model2.DWXZ;
        //        parameters4[81].Value = model2.WANGZHI;
        //        parameters4[82].Value = model2.FRGJ_DZ;
        //        parameters4[83].Value = model2.ZCD_DHHM;
        //        parameters4[84].Value = model2.SCD_DHHM;
        //        parameters4[85].Value = model2.HHR_ZS;
        //        parameters4[86].Value = model2.FR_YDDHHM;
        //        parameters4[87].Value = model2.BSR_YDDHHM;
        //        parameters4[88].Value = model2.BSR_DYDZ;
        //        parameters4[89].Value = model2.CW_YDDHHM;
        //        parameters4[90].Value = model2.CW_ZJLX_DM;
        //        parameters4[91].Value = model2.CW_DYDZ;
        //        parameters4[92].Value = model2.SWDLR_MC;
        //        parameters4[93].Value = model2.SWDLR_SBH;
        //        parameters4[94].Value = model2.SWDLR_DHHM;
        //        parameters4[95].Value = model2.SWDLR_DYDZ;
        //        parameters4[96].Value = model2.ZRRTZBL;
        //        parameters4[97].Value = model2.WZTZBL;
        //        parameters4[98].Value = model2.GYTZBL;
        //        parameters4[99].Value = model2.HYDLB_DM;
        //        parameters4[100].Value = model2.HYDLC_DM;
        //        parameters4[101].Value = model2.HYDLD_DM;
        //        parameters4[102].Value = model2.HYB_DM;
        //        parameters4[103].Value = model2.HYC_DM;
        //        parameters4[104].Value = model2.HYD_DM;
        //        parameters4[105].Value = model2.LSNSRLX_DM;
        //        parameters4[106].Value = model2.LSNSR_YXQ;
        //        parameters4[107].Value = model2.ZCZB_ZE;
        //        parameters4[108].Value = model2.ZCZBB;
        //        parameters4[109].Value = model2.ZCBZB_DM;
        //        parameters4[110].Value = model2.ZCZBC;
        //        parameters4[111].Value = model2.ZCBZC_DM;
        //        parameters4[112].Value = model2.KHDJZH;
        //        parameters4[113].Value = model2.DJZFZRQ;
        //        parameters4[114].Value = model2.WCBYY_DM;
        //        parameters4[115].Value = model2.QYTSBZ_DM;
        //        parameters4[116].Value = model2.DLFQ_DM;
        //        parameters4[117].Value = model2.DAH;
        //        parameters4[118].Value = model2.PQ_DM;
        //        parameters4[119].Value = model2.NSRTSZTLX_DM;
        //        parameters4[120].Value = model2.ZFXYH;
        //        parameters4[121].Value = model2.QXSDSGXJG;
        //        parameters4[122].Value = model2.BY_NSRSBH;
        //        cmds.CommandText = strSql.ToString();
        //        cmds.Parameters = parameters2;
        //        cmdList.Add(cmds);
        //    }

        //    foreach (Model.DJ_YHXX DJ_YHXXModel in DJ_YHXXList)
        //    {
        //        strSql = new StringBuilder();
        //        strSql.Append("insert into ltais.DJ_YHXX(");
        //        strSql.Append("XH,NSRDZDAH,YHZL_DM,YH_DM,YHZH,KLRQ,YHKLLB_DM,YXBZ,YSLWBZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,JKFS_DM,BGRQ,ZXRQ,BZ,SFJKZH)");
        //        strSql.Append(" values (");
        //        strSql.Append("@XH,@NSRDZDAH,@YHZL_DM,@YH_DM,@YHZH,@KLRQ,@YHKLLB_DM,@YXBZ,@YSLWBZ,@NSR_SWJG_DM,@SWJG_DM,@LRR_DM,@LRRQ,@XGR_DM,@XGRQ,@JKFS_DM,@BGRQ,@ZXRQ,@BZ,@SFJKZH)");
        //        SqlParameter[] parameters6 = {
        //            new SqlParameter("@XH", SqlDbType.Decimal,13),
        //            new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
        //            new SqlParameter("@YHZL_DM", SqlDbType.NVarChar,4),
        //            new SqlParameter("@YH_DM", SqlDbType.NVarChar,8),
        //            new SqlParameter("@YHZH", SqlDbType.NVarChar,50),
        //            new SqlParameter("@KLRQ", SqlDbType.DateTime),
        //            new SqlParameter("@YHKLLB_DM", SqlDbType.NVarChar,2),
        //            new SqlParameter("@YXBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@YSLWBZ", SqlDbType.NVarChar,1),
        //            new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@SWJG_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@LRRQ", SqlDbType.DateTime),
        //            new SqlParameter("@XGR_DM", SqlDbType.NVarChar,11),
        //            new SqlParameter("@XGRQ", SqlDbType.DateTime),
        //            new SqlParameter("@JKFS_DM", SqlDbType.NVarChar,15),
        //            new SqlParameter("@BGRQ", SqlDbType.DateTime),
        //            new SqlParameter("@ZXRQ", SqlDbType.DateTime),
        //            new SqlParameter("@BZ", SqlDbType.NVarChar,4000),
        //            new SqlParameter("@SFJKZH", SqlDbType.NVarChar,1)};
        //        parameters6[0].Value = DJ_YHXXModel.XH;
        //        parameters6[1].Value = DJ_YHXXModel.NSRDZDAH;
        //        parameters6[2].Value = DJ_YHXXModel.YHZL_DM;
        //        parameters6[3].Value = DJ_YHXXModel.YH_DM;
        //        parameters6[4].Value = DJ_YHXXModel.YHZH;
        //        parameters6[5].Value = DJ_YHXXModel.KLRQ;
        //        parameters6[6].Value = DJ_YHXXModel.YHKLLB_DM;
        //        parameters6[7].Value = DJ_YHXXModel.YXBZ;
        //        parameters6[8].Value = DJ_YHXXModel.YSLWBZ;
        //        parameters6[9].Value = DJ_YHXXModel.NSR_SWJG_DM;
        //        parameters6[10].Value = DJ_YHXXModel.SWJG_DM;
        //        parameters6[11].Value = DJ_YHXXModel.LRR_DM;
        //        parameters6[12].Value = DJ_YHXXModel.LRRQ;
        //        parameters6[13].Value = DJ_YHXXModel.XGR_DM;
        //        parameters6[14].Value = DJ_YHXXModel.XGRQ;
        //        parameters6[15].Value = DJ_YHXXModel.JKFS_DM;
        //        parameters6[16].Value = DJ_YHXXModel.BGRQ;
        //        parameters6[17].Value = DJ_YHXXModel.ZXRQ;
        //        parameters6[18].Value = DJ_YHXXModel.BZ;
        //        parameters6[19].Value = DJ_YHXXModel.SFJKZH;
        //        cmds.CommandText = strSql.ToString();
        //        cmds.Parameters = parameters6;
        //        cmdList.Add(cmds);

        //    }

        //    if (cmdList.Count > 0)
        //    {
        //        DbHelperSQL.ExecuteSqlTranWithString(cmdList);
        //    }
        //}

        public void AddALLPre(string strwhere, string fyear, Model.DJ_NSRXX_Extension1 model,string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            CommandInfo cmds = new CommandInfo();
            List<CommandInfo> cmdList = new List<CommandInfo>();
            strSql.Append("delete from fund.t_DJ_NSRXX_Extension1 ");
            strSql.Append(" where NSRDZDAH in ( ");
            strSql.Append(@"SELECT a.NSRDZDAH FROM fund.fn_DJ_NSRXX(" + fyear + @") a LEFT JOIN (
                                   SELECT NSRDZDAH,SUM(SE) AS se FROM fund.V_SB_ZSXX  ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" GROUP BY NSRDZDAH) b ON a.NSRDZDAH = b.NSRDZDAH");
            if (strwhere.Trim() != "")
            {
                strSql.Append(" where " + strwhere);
            }

            strSql.Append(") and FYear=@FYear and FEntityNo=@FEntityNo ");
            
            SqlParameter[] parameters4 = {
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12)			};
            parameters4[0].Value = model.FYear;
            parameters4[1].Value = model.FEntityNo;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters4;
            cmdList.Add(cmds);
            strSql = new StringBuilder();
            cmds = new CommandInfo();
            strSql.Append("insert into fund.t_DJ_NSRXX_Extension1(");
            strSql.Append("NSRDZDAH,FFinancePropNo,FYear,FEnterprisePropNo,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP,FUpdEmplNo,FUpdDeptNo,FUpdDate,FUpdIP)");
            strSql.Append(" select NSRDZDAH,@FFinancePropNo,@FYear,@FEnterprisePropNo,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP,@FUpdEmplNo,@FUpdDeptNo,@FUpdDate,@FUpdIP from (");
            strSql.Append(@"SELECT a.NSRDZDAH FROM fund.fn_DJ_NSRXX(" + fyear + @") a LEFT JOIN (
                                   SELECT NSRDZDAH,SUM(SE) AS se FROM fund.V_SB_ZSXX  ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" GROUP BY NSRDZDAH) b ON a.NSRDZDAH = b.NSRDZDAH");
            if (strwhere.Trim() != "")
            {
                strSql.Append(" where " + strwhere);
            }
            strSql.Append(") as a");
            SqlParameter[] parameters = {
					new SqlParameter("@FFinancePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEnterprisePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdEmplNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FUpdDate", SqlDbType.VarChar,30),
					new SqlParameter("@FUpdIP", SqlDbType.VarChar,15)};
            parameters[0].Value = model.FFinancePropNo;
            parameters[1].Value = model.FYear;
            parameters[2].Value = model.FEnterprisePropNo;
            parameters[3].Value = model.FEntityNo;
            parameters[4].Value = model.FInsEmpNo;
            parameters[5].Value = model.FInsDeptNo;
            parameters[6].Value = model.FInsDate;
            parameters[7].Value = model.FInsIP;
            parameters[8].Value = model.FUpdEmplNo;
            parameters[9].Value = model.FUpdDeptNo;
            parameters[10].Value = model.FUpdDate;
            parameters[11].Value = model.FUpdIP;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters;
            cmdList.Add(cmds); 
            if (cmdList.Count > 0)
            {
                DbHelperSQL.ExecuteSqlTranWithString(cmdList);
            }
        }


        /// <summary>
        /// 批量修改企业性质和资金性质
        /// </summary>
        /// <param name="model1"></param>
        public void AddALL(List<Model.DJ_NSRXX_Extension1> model1List,string noList)
        {
            StringBuilder strSql = new StringBuilder();
            CommandInfo cmds = new CommandInfo();
            List<CommandInfo> cmdList = new List<CommandInfo>();
            strSql.Append("delete from fund.t_DJ_NSRXX_Extension1 ");
            strSql.Append(" where NSRDZDAH in (" + noList + ") and FYear=@FYear and FEntityNo=@FEntityNo ");
            SqlParameter[] parameters4 = {
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12)			};
            parameters4[0].Value = model1List[0].FYear;
            parameters4[1].Value = model1List[0].FEntityNo;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters4;
            cmdList.Add(cmds);

            foreach (Model.DJ_NSRXX_Extension1 model1 in model1List)
            {
                strSql = new StringBuilder();
                cmds = new CommandInfo();
                strSql.Append("insert into fund.t_DJ_NSRXX_Extension1(");
                strSql.Append("NSRDZDAH,FFinancePropNo,FYear,FEnterprisePropNo,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP,FUpdEmplNo,FUpdDeptNo,FUpdDate,FUpdIP)");
                strSql.Append(" values (");
                strSql.Append("@NSRDZDAH,@FFinancePropNo,@FYear,@FEnterprisePropNo,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP,@FUpdEmplNo,@FUpdDeptNo,@FUpdDate,@FUpdIP)");
                SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@FFinancePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEnterprisePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdEmplNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FUpdDate", SqlDbType.VarChar,30),
					new SqlParameter("@FUpdIP", SqlDbType.VarChar,15)};
                parameters[0].Value = model1.NSRDZDAH;
                parameters[1].Value = model1.FFinancePropNo;
                parameters[2].Value = model1.FYear;
                parameters[3].Value = model1.FEnterprisePropNo;
                parameters[4].Value = model1.FEntityNo;
                parameters[5].Value = model1.FInsEmpNo;
                parameters[6].Value = model1.FInsDeptNo;
                parameters[7].Value = model1.FInsDate;
                parameters[8].Value = model1.FInsIP;
                parameters[9].Value = model1.FUpdEmplNo;
                parameters[10].Value = model1.FUpdDeptNo;
                parameters[11].Value = model1.FUpdDate;
                parameters[12].Value = model1.FUpdIP;
                cmds.CommandText = strSql.ToString();
                cmds.Parameters = parameters;
                cmdList.Add(cmds);

            }


            if (cmdList.Count > 0)
            {
                DbHelperSQL.ExecuteSqlTranWithString(cmdList);
            }
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(EnterpriseFund.Model.DJ_NSRXX_Extension1 model1, EnterpriseFund.Model.DJ_NSRXX_Extension2 model2)
        {
            StringBuilder strSql = new StringBuilder();
            CommandInfo cmds = new CommandInfo();
            List<CommandInfo> cmdList = new List<CommandInfo>();


            strSql.Append("delete from fund.t_DJ_NSRXX_Extension1 ");
            strSql.Append(" where NSRDZDAH=@NSRDZDAH and FYear=@FYear and FEntityNo=@FEntityNo ");
            SqlParameter[] parameters4 = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12)			};
            parameters4[0].Value = model1.NSRDZDAH;
            parameters4[1].Value = model1.FYear;
            parameters4[2].Value = model1.FEntityNo;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters4;
            cmdList.Add(cmds);


            strSql = new StringBuilder();
            cmds = new CommandInfo();
            strSql.Append("insert into fund.t_DJ_NSRXX_Extension1(");
            strSql.Append("NSRDZDAH,FFinancePropNo,FYear,FEnterprisePropNo,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP,FUpdEmplNo,FUpdDeptNo,FUpdDate,FUpdIP)");
            strSql.Append(" values (");
            strSql.Append("@NSRDZDAH,@FFinancePropNo,@FYear,@FEnterprisePropNo,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP,@FUpdEmplNo,@FUpdDeptNo,@FUpdDate,@FUpdIP)");
            SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@FFinancePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FEnterprisePropNo", SqlDbType.NVarChar,6),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdEmplNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FUpdDate", SqlDbType.VarChar,30),
					new SqlParameter("@FUpdIP", SqlDbType.VarChar,15)};
            parameters[0].Value = model1.NSRDZDAH;
            parameters[1].Value = model1.FFinancePropNo;
            parameters[2].Value = model1.FYear;
            parameters[3].Value = model1.FEnterprisePropNo;
            parameters[4].Value = model1.FEntityNo;
            parameters[5].Value = model1.FInsEmpNo;
            parameters[6].Value = model1.FInsDeptNo;
            parameters[7].Value = model1.FInsDate;
            parameters[8].Value = model1.FInsIP;
            parameters[9].Value = model1.FUpdEmplNo;
            parameters[10].Value = model1.FUpdDeptNo;
            parameters[11].Value = model1.FUpdDate;
            parameters[12].Value = model1.FUpdIP;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters;
            cmdList.Add(cmds);

            cmds = new CommandInfo();
            strSql = new StringBuilder();
            strSql.Append("delete from fund.t_DJ_NSRXX_Extension2 ");
            strSql.Append(" where NSRDZDAH=@NSRDZDAH and FEntityNo=@FEntityNo ");
            SqlParameter[] parameters3 = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12)			};
            parameters3[0].Value = model1.NSRDZDAH;
            parameters3[1].Value = model1.FEntityNo;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters3;
            cmdList.Add(cmds);

            cmds = new CommandInfo();
            strSql = new StringBuilder();
            strSql.Append("insert into fund.t_DJ_NSRXX_Extension2(");
            strSql.Append("NSRDZDAH,GS_NSRSBH,GS_NSRMC,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP,FUpdEmplNo,FUpdDeptNo,FUpdDate,FUpdIP)");
            strSql.Append(" values (");
            strSql.Append("@NSRDZDAH,@GS_NSRSBH,@GS_NSRMC,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP,@FUpdEmplNo,@FUpdDeptNo,@FUpdDate,@FUpdIP)");
            SqlParameter[] parameters2 = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@GS_NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@GS_NSRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdEmplNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FUpdDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FUpdDate", SqlDbType.VarChar,30),
					new SqlParameter("@FUpdIP", SqlDbType.VarChar,15)};
            parameters2[0].Value = model2.NSRDZDAH;
            parameters2[1].Value = model2.GS_NSRSBH;
            parameters2[2].Value = model2.GS_NSRMC;
            parameters2[3].Value = model2.FEntityNo;
            parameters2[4].Value = model2.FInsEmpNo;
            parameters2[5].Value = model2.FInsDeptNo;
            parameters2[6].Value = model2.FInsDate;
            parameters2[7].Value = model2.FInsIP;
            parameters2[8].Value = model2.FUpdEmplNo;
            parameters2[9].Value = model2.FUpdDeptNo;
            parameters2[10].Value = model2.FUpdDate;
            parameters2[11].Value = model2.FUpdIP;
            cmds.CommandText = strSql.ToString();
            cmds.Parameters = parameters2;
            cmdList.Add(cmds);

            if (cmdList.Count > 0)
            {
                DbHelperSQL.ExecuteSqlTranWithString(cmdList);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(EnterpriseFund.Model.DJ_NSRXX model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update fund.V_DJ_NSRXX set ");
            strSql.Append("NSRDZDAH=@NSRDZDAH,");
            strSql.Append("WSPZXH=@WSPZXH,");
            strSql.Append("NSRSBH=@NSRSBH,");
            strSql.Append("NSRBM=@NSRBM,");
            strSql.Append("NSRMC=@NSRMC,");
            strSql.Append("FDDBRMC=@FDDBRMC,");
            strSql.Append("FRZJLX_DM=@FRZJLX_DM,");
            strSql.Append("ZJHM=@ZJHM,");
            strSql.Append("SCJYDZ=@SCJYDZ,");
            strSql.Append("BSRMC=@BSRMC,");
            strSql.Append("DHHM=@DHHM,");
            strSql.Append("LSGX_DM=@LSGX_DM,");
            strSql.Append("HY_DM=@HY_DM,");
            strSql.Append("DJZCLX_DM=@DJZCLX_DM,");
            strSql.Append("HZDJRQ=@HZDJRQ,");
            strSql.Append("QYKJZD_DM=@QYKJZD_DM,");
            strSql.Append("SWDJBLX_DM=@SWDJBLX_DM,");
            strSql.Append("SWDJZLX_DM=@SWDJZLX_DM,");
            strSql.Append("NSRZT_DM=@NSRZT_DM,");
            strSql.Append("ZGSWRY_DM=@ZGSWRY_DM,");
            strSql.Append("JDXZ_DM=@JDXZ_DM,");
            strSql.Append("ZZSNSRLX_DM=@ZZSNSRLX_DM,");
            strSql.Append("GSYLB_DM=@GSYLB_DM,");
            strSql.Append("NSRXYDJ_DM=@NSRXYDJ_DM,");
            strSql.Append("QYGM_DM=@QYGM_DM,");
            strSql.Append("CYLX_DM=@CYLX_DM,");
            strSql.Append("XZQH_YSFPBL_DM=@XZQH_YSFPBL_DM,");
            strSql.Append("HGDM=@HGDM,");
            strSql.Append("ZJG_BZ=@ZJG_BZ,");
            strSql.Append("NSR_SWJG_DM=@NSR_SWJG_DM,");
            strSql.Append("SWJG_DM=@SWJG_DM,");
            strSql.Append("LRR_DM=@LRR_DM,");
            strSql.Append("LRRQ=@LRRQ,");
            strSql.Append("XGR_DM=@XGR_DM,");
            strSql.Append("XGRQ=@XGRQ,");
            strSql.Append("HDFS_DM=@HDFS_DM,");
            strSql.Append("DSZ=@DSZ,");
            strSql.Append("NSRMC_JC=@NSRMC_JC,");
            strSql.Append("ZJL=@ZJL,");
            strSql.Append("QYFR_DM=@QYFR_DM,");
            strSql.Append("FZDW_MC=@FZDW_MC,");
            strSql.Append("FZHM=@FZHM,");
            strSql.Append("JYFS_DM=@JYFS_DM,");
            strSql.Append("NSRLB_DM=@NSRLB_DM,");
            strSql.Append("GDGGBZ=@GDGGBZ,");
            strSql.Append("KGFS_DM=@KGFS_DM,");
            strSql.Append("HYDL_DM=@HYDL_DM,");
            strSql.Append("BF_SJQYXZ_DM=@BF_SJQYXZ_DM,");
            strSql.Append("NSRMC_YW=@NSRMC_YW,");
            strSql.Append("GSHBZ=@GSHBZ,");
            strSql.Append("FRBZ=@FRBZ,");
            strSql.Append("ZCDZ=@ZCDZ,");
            strSql.Append("ZCD_YB=@ZCD_YB,");
            strSql.Append("SCJYD_YB=@SCJYD_YB,");
            strSql.Append("DYDZ=@DYDZ,");
            strSql.Append("GSKYRQ=@GSKYRQ,");
            strSql.Append("HSXS_DM=@HSXS_DM,");
            strSql.Append("BSR_ZJLX_DM=@BSR_ZJLX_DM,");
            strSql.Append("BSR_ZJHM=@BSR_ZJHM,");
            strSql.Append("JSJDJDM=@JSJDJDM,");
            strSql.Append("GSDJJG_MC=@GSDJJG_MC,");
            strSql.Append("ZZLB_DM=@ZZLB_DM,");
            strSql.Append("GSDJZZH=@GSDJZZH,");
            strSql.Append("YXQ_Q=@YXQ_Q,");
            strSql.Append("YXQ_Z=@YXQ_Z,");
            strSql.Append("ZY=@ZY,");
            strSql.Append("JY=@JY,");
            strSql.Append("JYFS=@JYFS,");
            strSql.Append("SCJYQX_Q=@SCJYQX_Q,");
            strSql.Append("SCJYQX_Z=@SCJYQX_Z,");
            strSql.Append("GSFZRQ=@GSFZRQ,");
            strSql.Append("ZCZB=@ZCZB,");
            strSql.Append("ZCBZ_DM=@ZCBZ_DM,");
            strSql.Append("TZZE=@TZZE,");
            strSql.Append("TZBZ_DM=@TZBZ_DM,");
            strSql.Append("CYRS=@CYRS,");
            strSql.Append("WJRS=@WJRS,");
            strSql.Append("YZZZ=@YZZZ,");
            strSql.Append("ZGDW=@ZGDW,");
            strSql.Append("JYFWDW=@JYFWDW,");
            strSql.Append("ZJGYB=@ZJGYB,");
            strSql.Append("PZJG=@PZJG,");
            strSql.Append("PZWH=@PZWH,");
            strSql.Append("PZRQ=@PZRQ,");
            strSql.Append("ZHZCQK=@ZHZCQK,");
            strSql.Append("CJQ_Q=@CJQ_Q,");
            strSql.Append("CJQ_Z=@CJQ_Z,");
            strSql.Append("HWCFC=@HWCFC,");
            strSql.Append("HWCFDMJ=@HWCFDMJ,");
            strSql.Append("CWFZRMC=@CWFZRMC,");
            strSql.Append("CWBBZL=@CWBBZL,");
            strSql.Append("GDZCZJFS=@GDZCZJFS,");
            strSql.Append("YHPTXFF=@YHPTXFF,");
            strSql.Append("KJND=@KJND,");
            strSql.Append("JZBWB_DM=@JZBWB_DM,");
            strSql.Append("JZLB=@JZLB,");
            strSql.Append("JZFS=@JZFS,");
            strSql.Append("JZRQ=@JZRQ,");
            strSql.Append("FZRQ=@FZRQ,");
            strSql.Append("FRGJ_DM=@FRGJ_DM,");
            strSql.Append("TZFS_DM=@TZFS_DM,");
            strSql.Append("JYMS_DM=@JYMS_DM,");
            strSql.Append("HJLX_DM=@HJLX_DM,");
            strSql.Append("SBDJZH=@SBDJZH,");
            strSql.Append("HYML_DM=@HYML_DM,");
            strSql.Append("ZJFL_DM=@ZJFL_DM,");
            strSql.Append("DSBZ=@DSBZ,");
            strSql.Append("NSFS_DM=@NSFS_DM,");
            strSql.Append("FRXB_DM=@FRXB_DM,");
            strSql.Append("FRZW=@FRZW,");
            strSql.Append("FRNL=@FRNL,");
            strSql.Append("FRDH=@FRDH,");
            strSql.Append("CWFZRXB_DM=@CWFZRXB_DM,");
            strSql.Append("CWFZRZW=@CWFZRZW,");
            strSql.Append("CWFZRNL=@CWFZRNL,");
            strSql.Append("CWFZRDH=@CWFZRDH,");
            strSql.Append("CWFZRSFHM=@CWFZRSFHM,");
            strSql.Append("BSRYXB_DM=@BSRYXB_DM,");
            strSql.Append("BSRYZW=@BSRYZW,");
            strSql.Append("BSRYNL=@BSRYNL,");
            strSql.Append("BSRYDH=@BSRYDH,");
            strSql.Append("DWXZ=@DWXZ,");
            strSql.Append("WANGZHI=@WANGZHI,");
            strSql.Append("FRGJ_DZ=@FRGJ_DZ,");
            strSql.Append("ZCD_DHHM=@ZCD_DHHM,");
            strSql.Append("SCD_DHHM=@SCD_DHHM,");
            strSql.Append("HHR_ZS=@HHR_ZS,");
            strSql.Append("FR_YDDHHM=@FR_YDDHHM,");
            strSql.Append("BSR_YDDHHM=@BSR_YDDHHM,");
            strSql.Append("BSR_DYDZ=@BSR_DYDZ,");
            strSql.Append("CW_YDDHHM=@CW_YDDHHM,");
            strSql.Append("CW_ZJLX_DM=@CW_ZJLX_DM,");
            strSql.Append("CW_DYDZ=@CW_DYDZ,");
            strSql.Append("SWDLR_MC=@SWDLR_MC,");
            strSql.Append("SWDLR_SBH=@SWDLR_SBH,");
            strSql.Append("SWDLR_DHHM=@SWDLR_DHHM,");
            strSql.Append("SWDLR_DYDZ=@SWDLR_DYDZ,");
            strSql.Append("ZRRTZBL=@ZRRTZBL,");
            strSql.Append("WZTZBL=@WZTZBL,");
            strSql.Append("GYTZBL=@GYTZBL,");
            strSql.Append("HYDLB_DM=@HYDLB_DM,");
            strSql.Append("HYDLC_DM=@HYDLC_DM,");
            strSql.Append("HYDLD_DM=@HYDLD_DM,");
            strSql.Append("HYB_DM=@HYB_DM,");
            strSql.Append("HYC_DM=@HYC_DM,");
            strSql.Append("HYD_DM=@HYD_DM,");
            strSql.Append("LSNSRLX_DM=@LSNSRLX_DM,");
            strSql.Append("LSNSR_YXQ=@LSNSR_YXQ,");
            strSql.Append("ZCZB_ZE=@ZCZB_ZE,");
            strSql.Append("ZCZBB=@ZCZBB,");
            strSql.Append("ZCBZB_DM=@ZCBZB_DM,");
            strSql.Append("ZCZBC=@ZCZBC,");
            strSql.Append("ZCBZC_DM=@ZCBZC_DM,");
            strSql.Append("KHDJZH=@KHDJZH,");
            strSql.Append("DJZFZRQ=@DJZFZRQ,");
            strSql.Append("WCBYY_DM=@WCBYY_DM,");
            strSql.Append("QYTSBZ_DM=@QYTSBZ_DM,");
            strSql.Append("DLFQ_DM=@DLFQ_DM,");
            strSql.Append("DAH=@DAH,");
            strSql.Append("PQ_DM=@PQ_DM,");
            strSql.Append("NSRTSZTLX_DM=@NSRTSZTLX_DM,");
            strSql.Append("ZFXYH=@ZFXYH,");
            strSql.Append("QXSDSGXJG=@QXSDSGXJG,");
            strSql.Append("BY_NSRSBH=@BY_NSRSBH,");
            strSql.Append("GS_NSRSBH=@GS_NSRSBH,");
            strSql.Append("GS_NSRMC=@GS_NSRMC");
            strSql.Append(" where NSRDZDAH=@NSRDZDAH ");
            SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@WSPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@NSRBM", SqlDbType.NVarChar,20),
					new SqlParameter("@NSRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@FDDBRMC", SqlDbType.NVarChar,100),
					new SqlParameter("@FRZJLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZJHM", SqlDbType.NVarChar,20),
					new SqlParameter("@SCJYDZ", SqlDbType.NVarChar,400),
					new SqlParameter("@BSRMC", SqlDbType.NVarChar,20),
					new SqlParameter("@DHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@LSGX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HY_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@DJZCLX_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@HZDJRQ", SqlDbType.DateTime),
					new SqlParameter("@QYKJZD_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SWDJBLX_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@SWDJZLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@NSRZT_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZGSWRY_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@JDXZ_DM", SqlDbType.NVarChar,10),
					new SqlParameter("@ZZSNSRLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@GSYLB_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@NSRXYDJ_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@QYGM_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@CYLX_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@XZQH_YSFPBL_DM", SqlDbType.NVarChar,6),
					new SqlParameter("@HGDM", SqlDbType.NVarChar,30),
					new SqlParameter("@ZJG_BZ", SqlDbType.NVarChar,1),
					new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@LRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@LRRQ", SqlDbType.DateTime),
					new SqlParameter("@XGR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@XGRQ", SqlDbType.DateTime),
					new SqlParameter("@HDFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@DSZ", SqlDbType.NVarChar,80),
					new SqlParameter("@NSRMC_JC", SqlDbType.NVarChar,80),
					new SqlParameter("@ZJL", SqlDbType.NVarChar,80),
					new SqlParameter("@QYFR_DM", SqlDbType.NVarChar,80),
					new SqlParameter("@FZDW_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@FZHM", SqlDbType.NVarChar,80),
					new SqlParameter("@JYFS_DM", SqlDbType.NVarChar,100),
					new SqlParameter("@NSRLB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@GDGGBZ", SqlDbType.NVarChar,1),
					new SqlParameter("@KGFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HYDL_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@BF_SJQYXZ_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@NSRMC_YW", SqlDbType.NVarChar,80),
					new SqlParameter("@GSHBZ", SqlDbType.NVarChar,1),
					new SqlParameter("@FRBZ", SqlDbType.NVarChar,1),
					new SqlParameter("@ZCDZ", SqlDbType.NVarChar,400),
					new SqlParameter("@ZCD_YB", SqlDbType.NVarChar,6),
					new SqlParameter("@SCJYD_YB", SqlDbType.NVarChar,6),
					new SqlParameter("@DYDZ", SqlDbType.NVarChar,30),
					new SqlParameter("@GSKYRQ", SqlDbType.DateTime),
					new SqlParameter("@HSXS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@BSR_ZJLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@BSR_ZJHM", SqlDbType.NVarChar,20),
					new SqlParameter("@JSJDJDM", SqlDbType.NVarChar,9),
					new SqlParameter("@GSDJJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@ZZLB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@GSDJZZH", SqlDbType.NVarChar,50),
					new SqlParameter("@YXQ_Q", SqlDbType.DateTime),
					new SqlParameter("@YXQ_Z", SqlDbType.DateTime),
					new SqlParameter("@ZY", SqlDbType.NVarChar,4000),
					new SqlParameter("@JY", SqlDbType.NVarChar,4000),
					new SqlParameter("@JYFS", SqlDbType.NVarChar,100),
					new SqlParameter("@SCJYQX_Q", SqlDbType.DateTime),
					new SqlParameter("@SCJYQX_Z", SqlDbType.DateTime),
					new SqlParameter("@GSFZRQ", SqlDbType.DateTime),
					new SqlParameter("@ZCZB", SqlDbType.Decimal,9),
					new SqlParameter("@ZCBZ_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@TZZE", SqlDbType.Decimal,9),
					new SqlParameter("@TZBZ_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@CYRS", SqlDbType.BigInt,8),
					new SqlParameter("@WJRS", SqlDbType.BigInt,8),
					new SqlParameter("@YZZZ", SqlDbType.NVarChar,80),
					new SqlParameter("@ZGDW", SqlDbType.NVarChar,80),
					new SqlParameter("@JYFWDW", SqlDbType.NVarChar,80),
					new SqlParameter("@ZJGYB", SqlDbType.NVarChar,30),
					new SqlParameter("@PZJG", SqlDbType.NVarChar,80),
					new SqlParameter("@PZWH", SqlDbType.NVarChar,50),
					new SqlParameter("@PZRQ", SqlDbType.DateTime),
					new SqlParameter("@ZHZCQK", SqlDbType.NVarChar,250),
					new SqlParameter("@CJQ_Q", SqlDbType.DateTime),
					new SqlParameter("@CJQ_Z", SqlDbType.DateTime),
					new SqlParameter("@HWCFC", SqlDbType.NVarChar,80),
					new SqlParameter("@HWCFDMJ", SqlDbType.NVarChar,20),
					new SqlParameter("@CWFZRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@CWBBZL", SqlDbType.NVarChar,120),
					new SqlParameter("@GDZCZJFS", SqlDbType.NVarChar,80),
					new SqlParameter("@YHPTXFF", SqlDbType.NVarChar,80),
					new SqlParameter("@KJND", SqlDbType.NVarChar,30),
					new SqlParameter("@JZBWB_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@JZLB", SqlDbType.NVarChar,1),
					new SqlParameter("@JZFS", SqlDbType.NVarChar,1),
					new SqlParameter("@JZRQ", SqlDbType.SmallInt,2),
					new SqlParameter("@FZRQ", SqlDbType.DateTime),
					new SqlParameter("@FRGJ_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@TZFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@JYMS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HJLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SBDJZH", SqlDbType.NVarChar,20),
					new SqlParameter("@HYML_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZJFL_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@DSBZ", SqlDbType.NVarChar,1),
					new SqlParameter("@NSFS_DM", SqlDbType.NVarChar,8),
					new SqlParameter("@FRXB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@FRZW", SqlDbType.NVarChar,90),
					new SqlParameter("@FRNL", SqlDbType.Int,4),
					new SqlParameter("@FRDH", SqlDbType.NVarChar,60),
					new SqlParameter("@CWFZRXB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@CWFZRZW", SqlDbType.NVarChar,90),
					new SqlParameter("@CWFZRNL", SqlDbType.Int,4),
					new SqlParameter("@CWFZRDH", SqlDbType.NVarChar,60),
					new SqlParameter("@CWFZRSFHM", SqlDbType.NVarChar,60),
					new SqlParameter("@BSRYXB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@BSRYZW", SqlDbType.NVarChar,90),
					new SqlParameter("@BSRYNL", SqlDbType.Int,4),
					new SqlParameter("@BSRYDH", SqlDbType.NVarChar,60),
					new SqlParameter("@DWXZ", SqlDbType.NVarChar,60),
					new SqlParameter("@WANGZHI", SqlDbType.NVarChar,60),
					new SqlParameter("@FRGJ_DZ", SqlDbType.NVarChar,60),
					new SqlParameter("@ZCD_DHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@SCD_DHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@HHR_ZS", SqlDbType.BigInt,8),
					new SqlParameter("@FR_YDDHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@BSR_YDDHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@BSR_DYDZ", SqlDbType.NVarChar,60),
					new SqlParameter("@CW_YDDHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@CW_ZJLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@CW_DYDZ", SqlDbType.NVarChar,60),
					new SqlParameter("@SWDLR_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@SWDLR_SBH", SqlDbType.NVarChar,20),
					new SqlParameter("@SWDLR_DHHM", SqlDbType.NVarChar,60),
					new SqlParameter("@SWDLR_DYDZ", SqlDbType.NVarChar,60),
					new SqlParameter("@ZRRTZBL", SqlDbType.Float,8),
					new SqlParameter("@WZTZBL", SqlDbType.Float,8),
					new SqlParameter("@GYTZBL", SqlDbType.Float,8),
					new SqlParameter("@HYDLB_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HYDLC_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HYDLD_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@HYB_DM", SqlDbType.NVarChar,6),
					new SqlParameter("@HYC_DM", SqlDbType.NVarChar,6),
					new SqlParameter("@HYD_DM", SqlDbType.NVarChar,6),
					new SqlParameter("@LSNSRLX_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@LSNSR_YXQ", SqlDbType.NVarChar,10),
					new SqlParameter("@ZCZB_ZE", SqlDbType.Decimal,9),
					new SqlParameter("@ZCZBB", SqlDbType.Decimal,9),
					new SqlParameter("@ZCBZB_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@ZCZBC", SqlDbType.Decimal,9),
					new SqlParameter("@ZCBZC_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@KHDJZH", SqlDbType.NVarChar,80),
					new SqlParameter("@DJZFZRQ", SqlDbType.DateTime),
					new SqlParameter("@WCBYY_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@QYTSBZ_DM", SqlDbType.NVarChar,50),
					new SqlParameter("@DLFQ_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@DAH", SqlDbType.NVarChar,20),
					new SqlParameter("@PQ_DM", SqlDbType.Decimal,13),
					new SqlParameter("@NSRTSZTLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZFXYH", SqlDbType.NVarChar,100),
					new SqlParameter("@QXSDSGXJG", SqlDbType.NVarChar,1),
					new SqlParameter("@BY_NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@GS_NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@GS_NSRMC", SqlDbType.NVarChar,80)};
            parameters[0].Value = model.NSRDZDAH;
            parameters[1].Value = model.WSPZXH;
            parameters[2].Value = model.NSRSBH;
            parameters[3].Value = model.NSRBM;
            parameters[4].Value = model.NSRMC;
            parameters[5].Value = model.FDDBRMC;
            parameters[6].Value = model.FRZJLX_DM;
            parameters[7].Value = model.ZJHM;
            parameters[8].Value = model.SCJYDZ;
            parameters[9].Value = model.BSRMC;
            parameters[10].Value = model.DHHM;
            parameters[11].Value = model.LSGX_DM;
            parameters[12].Value = model.HY_DM;
            parameters[13].Value = model.DJZCLX_DM;
            parameters[14].Value = model.HZDJRQ;
            parameters[15].Value = model.QYKJZD_DM;
            parameters[16].Value = model.SWDJBLX_DM;
            parameters[17].Value = model.SWDJZLX_DM;
            parameters[18].Value = model.NSRZT_DM;
            parameters[19].Value = model.ZGSWRY_DM;
            parameters[20].Value = model.JDXZ_DM;
            parameters[21].Value = model.ZZSNSRLX_DM;
            parameters[22].Value = model.GSYLB_DM;
            parameters[23].Value = model.NSRXYDJ_DM;
            parameters[24].Value = model.QYGM_DM;
            parameters[25].Value = model.CYLX_DM;
            parameters[26].Value = model.XZQH_YSFPBL_DM;
            parameters[27].Value = model.HGDM;
            parameters[28].Value = model.ZJG_BZ;
            parameters[29].Value = model.NSR_SWJG_DM;
            parameters[30].Value = model.SWJG_DM;
            parameters[31].Value = model.LRR_DM;
            parameters[32].Value = model.LRRQ;
            parameters[33].Value = model.XGR_DM;
            parameters[34].Value = model.XGRQ;
            parameters[35].Value = model.HDFS_DM;
            parameters[36].Value = model.DSZ;
            parameters[37].Value = model.NSRMC_JC;
            parameters[38].Value = model.ZJL;
            parameters[39].Value = model.QYFR_DM;
            parameters[40].Value = model.FZDW_MC;
            parameters[41].Value = model.FZHM;
            parameters[42].Value = model.JYFS_DM;
            parameters[43].Value = model.NSRLB_DM;
            parameters[44].Value = model.GDGGBZ;
            parameters[45].Value = model.KGFS_DM;
            parameters[46].Value = model.HYDL_DM;
            parameters[47].Value = model.BF_SJQYXZ_DM;
            parameters[48].Value = model.NSRMC_YW;
            parameters[49].Value = model.GSHBZ;
            parameters[50].Value = model.FRBZ;
            parameters[51].Value = model.ZCDZ;
            parameters[52].Value = model.ZCD_YB;
            parameters[53].Value = model.SCJYD_YB;
            parameters[54].Value = model.DYDZ;
            parameters[55].Value = model.GSKYRQ;
            parameters[56].Value = model.HSXS_DM;
            parameters[57].Value = model.BSR_ZJLX_DM;
            parameters[58].Value = model.BSR_ZJHM;
            parameters[59].Value = model.JSJDJDM;
            parameters[60].Value = model.GSDJJG_MC;
            parameters[61].Value = model.ZZLB_DM;
            parameters[62].Value = model.GSDJZZH;
            parameters[63].Value = model.YXQ_Q;
            parameters[64].Value = model.YXQ_Z;
            parameters[65].Value = model.ZY;
            parameters[66].Value = model.JY;
            parameters[67].Value = model.JYFS;
            parameters[68].Value = model.SCJYQX_Q;
            parameters[69].Value = model.SCJYQX_Z;
            parameters[70].Value = model.GSFZRQ;
            parameters[71].Value = model.ZCZB;
            parameters[72].Value = model.ZCBZ_DM;
            parameters[73].Value = model.TZZE;
            parameters[74].Value = model.TZBZ_DM;
            parameters[75].Value = model.CYRS;
            parameters[76].Value = model.WJRS;
            parameters[77].Value = model.YZZZ;
            parameters[78].Value = model.ZGDW;
            parameters[79].Value = model.JYFWDW;
            parameters[80].Value = model.ZJGYB;
            parameters[81].Value = model.PZJG;
            parameters[82].Value = model.PZWH;
            parameters[83].Value = model.PZRQ;
            parameters[84].Value = model.ZHZCQK;
            parameters[85].Value = model.CJQ_Q;
            parameters[86].Value = model.CJQ_Z;
            parameters[87].Value = model.HWCFC;
            parameters[88].Value = model.HWCFDMJ;
            parameters[89].Value = model.CWFZRMC;
            parameters[90].Value = model.CWBBZL;
            parameters[91].Value = model.GDZCZJFS;
            parameters[92].Value = model.YHPTXFF;
            parameters[93].Value = model.KJND;
            parameters[94].Value = model.JZBWB_DM;
            parameters[95].Value = model.JZLB;
            parameters[96].Value = model.JZFS;
            parameters[97].Value = model.JZRQ;
            parameters[98].Value = model.FZRQ;
            parameters[99].Value = model.FRGJ_DM;
            parameters[100].Value = model.TZFS_DM;
            parameters[101].Value = model.JYMS_DM;
            parameters[102].Value = model.HJLX_DM;
            parameters[103].Value = model.SBDJZH;
            parameters[104].Value = model.HYML_DM;
            parameters[105].Value = model.ZJFL_DM;
            parameters[106].Value = model.DSBZ;
            parameters[107].Value = model.NSFS_DM;
            parameters[108].Value = model.FRXB_DM;
            parameters[109].Value = model.FRZW;
            parameters[110].Value = model.FRNL;
            parameters[111].Value = model.FRDH;
            parameters[112].Value = model.CWFZRXB_DM;
            parameters[113].Value = model.CWFZRZW;
            parameters[114].Value = model.CWFZRNL;
            parameters[115].Value = model.CWFZRDH;
            parameters[116].Value = model.CWFZRSFHM;
            parameters[117].Value = model.BSRYXB_DM;
            parameters[118].Value = model.BSRYZW;
            parameters[119].Value = model.BSRYNL;
            parameters[120].Value = model.BSRYDH;
            parameters[121].Value = model.DWXZ;
            parameters[122].Value = model.WANGZHI;
            parameters[123].Value = model.FRGJ_DZ;
            parameters[124].Value = model.ZCD_DHHM;
            parameters[125].Value = model.SCD_DHHM;
            parameters[126].Value = model.HHR_ZS;
            parameters[127].Value = model.FR_YDDHHM;
            parameters[128].Value = model.BSR_YDDHHM;
            parameters[129].Value = model.BSR_DYDZ;
            parameters[130].Value = model.CW_YDDHHM;
            parameters[131].Value = model.CW_ZJLX_DM;
            parameters[132].Value = model.CW_DYDZ;
            parameters[133].Value = model.SWDLR_MC;
            parameters[134].Value = model.SWDLR_SBH;
            parameters[135].Value = model.SWDLR_DHHM;
            parameters[136].Value = model.SWDLR_DYDZ;
            parameters[137].Value = model.ZRRTZBL;
            parameters[138].Value = model.WZTZBL;
            parameters[139].Value = model.GYTZBL;
            parameters[140].Value = model.HYDLB_DM;
            parameters[141].Value = model.HYDLC_DM;
            parameters[142].Value = model.HYDLD_DM;
            parameters[143].Value = model.HYB_DM;
            parameters[144].Value = model.HYC_DM;
            parameters[145].Value = model.HYD_DM;
            parameters[146].Value = model.LSNSRLX_DM;
            parameters[147].Value = model.LSNSR_YXQ;
            parameters[148].Value = model.ZCZB_ZE;
            parameters[149].Value = model.ZCZBB;
            parameters[150].Value = model.ZCBZB_DM;
            parameters[151].Value = model.ZCZBC;
            parameters[152].Value = model.ZCBZC_DM;
            parameters[153].Value = model.KHDJZH;
            parameters[154].Value = model.DJZFZRQ;
            parameters[155].Value = model.WCBYY_DM;
            parameters[156].Value = model.QYTSBZ_DM;
            parameters[157].Value = model.DLFQ_DM;
            parameters[158].Value = model.DAH;
            parameters[159].Value = model.PQ_DM;
            parameters[160].Value = model.NSRTSZTLX_DM;
            parameters[161].Value = model.ZFXYH;
            parameters[162].Value = model.QXSDSGXJG;
            parameters[163].Value = model.BY_NSRSBH;
            parameters[164].Value = model.GS_NSRSBH;
            parameters[165].Value = model.GS_NSRMC;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(decimal NSRDZDAH)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from fund.V_DJ_NSRXX ");
            strSql.Append(" where NSRDZDAH=@NSRDZDAH ");
            SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13)			};
            parameters[0].Value = NSRDZDAH;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string NSRDZDAHlist)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from fund.V_DJ_NSRXX ");
            strSql.Append(" where NSRDZDAH in (" + NSRDZDAHlist + ")  ");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNSRBM(string NSRBM, string fyear)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,G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DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH,GS_NSRSBH,GS_NSRMC, FEnterprisePropNo ,FFinancePropNo ,FFinancePropName ,FEnterprisePropName from fund.fn_DJ_NSRXX(" + fyear + ") ");
            strSql.Append(" where NSRBM like '%" + NSRBM + "%' ");

            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNSRBMAndNsrmcAndNsrsbh(string NSRBM,string NSRMC,string NSRSBH)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append(" SELECT * FROM fund.V_DJ_NSRXX");
            strSql.Append(" where NSRBM =@NSRBM and NSRMC=@NSRMC and NSRSBH=@NSRSBH");
            SqlParameter[] parameters = {  new SqlParameter("@NSRBM", SqlDbType.NVarChar,20)		,
                                           new SqlParameter("@NSRMC", SqlDbType.NVarChar,80)		,
										new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20)	};
            parameters[0].Value = NSRBM;
            parameters[1].Value = NSRMC;
            parameters[2].Value = NSRSBH;
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(),parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNSRBMAndNsrmc(string NSRBM, string NSRMC)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append(" SELECT * FROM fund.V_DJ_NSRXX");
            strSql.Append(" where NSRBM =@NSRBM and NSRMC=@NSRMC");
            SqlParameter[] parameters = {  new SqlParameter("@NSRBM", SqlDbType.NVarChar,20)		,
                                           new SqlParameter("@NSRMC", SqlDbType.NVarChar,80)		
											};
            parameters[0].Value = NSRBM;
            parameters[1].Value = NSRMC;
           
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNsrmcAndNsrsbh( string NSRMC, string NSRSBH)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append(" SELECT * FROM fund.V_DJ_NSRXX");
            strSql.Append(" where  NSRMC=@NSRMC and NSRSBH=@NSRSBH");
            SqlParameter[] parameters = { 
                                           new SqlParameter("@NSRMC", SqlDbType.NVarChar,80)		,
										new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20)	};
            parameters[0].Value = NSRMC;
            parameters[1].Value = NSRSBH;
          
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNSRBM(string NSRBM)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("SELECT * FROM fund.V_DJ_NSRXX");
            strSql.Append(" where NSRBM =@NSRBM ");
            SqlParameter[] parameters = {  new SqlParameter("@NSRBM", SqlDbType.NVarChar,20)	
                                          	};
            parameters[0].Value = NSRBM;
           
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNsrsbh( string NSRSBH)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("SELECT * FROM fund.V_DJ_NSRXX");
            strSql.Append(" where NSRSBH=@NSRSBH");
            SqlParameter[] parameters = { 
										new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20)	};
          
            parameters[0].Value = NSRSBH;
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        public EnterpriseFund.Model.DJ_NSRXX GetModelByNSRBMlike(string NSRBM, string fyear)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH,GS_NSRSBH,GS_NSRMC, FEnterprisePropNo ,FFinancePropNo ,FFinancePropName ,FEnterprisePropName from fund.fn_DJ_NSRXX(" + fyear + ") ");
            strSql.Append(" where NSRBM like '%"+NSRBM+"%'  ");
            //SqlParameter[] parameters = {
            //        new SqlParameter("@NSRBM", SqlDbType.NVarChar,20)			};
            //parameters[0].Value = NSRBM;

            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public EnterpriseFund.Model.DJ_NSRXX GetModel(decimal NSRDZDAH,string fyear)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH,GS_NSRSBH,GS_NSRMC, FEnterprisePropNo ,FFinancePropNo ,FFinancePropName ,FEnterprisePropName from fund.fn_DJ_NSRXX(" + fyear + ") ");
            strSql.Append(" where NSRDZDAH=@NSRDZDAH ");
            SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13)			};
            parameters[0].Value = NSRDZDAH;

            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public EnterpriseFund.Model.DJ_NSRXX DataRowToModel(DataRow row)
        {
            EnterpriseFund.Model.DJ_NSRXX model = new EnterpriseFund.Model.DJ_NSRXX();
            if (row != null)
            {
                if (row["NSRDZDAH"] != null && row["NSRDZDAH"].ToString() != "")
                {
                    model.NSRDZDAH = decimal.Parse(row["NSRDZDAH"].ToString());
                }
                if (row["WSPZXH"] != null && row["WSPZXH"].ToString() != "")
                {
                    model.WSPZXH = decimal.Parse(row["WSPZXH"].ToString());
                }
                if (row["NSRSBH"] != null)
                {
                    model.NSRSBH = row["NSRSBH"].ToString();
                }
                if (row["NSRBM"] != null)
                {
                    model.NSRBM = row["NSRBM"].ToString();
                }
                if (row["NSRMC"] != null)
                {
                    model.NSRMC = row["NSRMC"].ToString();
                }
                if (row["FDDBRMC"] != null)
                {
                    model.FDDBRMC = row["FDDBRMC"].ToString();
                }
                if (row["FRZJLX_DM"] != null)
                {
                    model.FRZJLX_DM = row["FRZJLX_DM"].ToString();
                }
                if (row["ZJHM"] != null)
                {
                    model.ZJHM = row["ZJHM"].ToString();
                }
                if (row["SCJYDZ"] != null)
                {
                    model.SCJYDZ = row["SCJYDZ"].ToString();
                }
                if (row["BSRMC"] != null)
                {
                    model.BSRMC = row["BSRMC"].ToString();
                }
                if (row["DHHM"] != null)
                {
                    model.DHHM = row["DHHM"].ToString();
                }
                if (row["LSGX_DM"] != null)
                {
                    model.LSGX_DM = row["LSGX_DM"].ToString();
                }
                if (row["HY_DM"] != null)
                {
                    model.HY_DM = row["HY_DM"].ToString();
                }
                if (row["DJZCLX_DM"] != null)
                {
                    model.DJZCLX_DM = row["DJZCLX_DM"].ToString();
                }
                if (row["HZDJRQ"] != null && row["HZDJRQ"].ToString() != "")
                {
                    model.HZDJRQ = DateTime.Parse(row["HZDJRQ"].ToString());
                }
                if (row["QYKJZD_DM"] != null)
                {
                    model.QYKJZD_DM = row["QYKJZD_DM"].ToString();
                }
                if (row["SWDJBLX_DM"] != null)
                {
                    model.SWDJBLX_DM = row["SWDJBLX_DM"].ToString();
                }
                if (row["SWDJZLX_DM"] != null)
                {
                    model.SWDJZLX_DM = row["SWDJZLX_DM"].ToString();
                }
                if (row["NSRZT_DM"] != null)
                {
                    model.NSRZT_DM = row["NSRZT_DM"].ToString();
                }
                if (row["ZGSWRY_DM"] != null)
                {
                    model.ZGSWRY_DM = row["ZGSWRY_DM"].ToString();
                }
                if (row["JDXZ_DM"] != null)
                {
                    model.JDXZ_DM = row["JDXZ_DM"].ToString();
                }
                if (row["ZZSNSRLX_DM"] != null)
                {
                    model.ZZSNSRLX_DM = row["ZZSNSRLX_DM"].ToString();
                }
                if (row["GSYLB_DM"] != null)
                {
                    model.GSYLB_DM = row["GSYLB_DM"].ToString();
                }
                if (row["NSRXYDJ_DM"] != null)
                {
                    model.NSRXYDJ_DM = row["NSRXYDJ_DM"].ToString();
                }
                if (row["QYGM_DM"] != null)
                {
                    model.QYGM_DM = row["QYGM_DM"].ToString();
                }
                if (row["CYLX_DM"] != null)
                {
                    model.CYLX_DM = row["CYLX_DM"].ToString();
                }
                if (row["XZQH_YSFPBL_DM"] != null)
                {
                    model.XZQH_YSFPBL_DM = row["XZQH_YSFPBL_DM"].ToString();
                }
                if (row["HGDM"] != null)
                {
                    model.HGDM = row["HGDM"].ToString();
                }
                if (row["ZJG_BZ"] != null)
                {
                    model.ZJG_BZ = row["ZJG_BZ"].ToString();
                }
                if (row["NSR_SWJG_DM"] != null)
                {
                    model.NSR_SWJG_DM = row["NSR_SWJG_DM"].ToString();
                }
                if (row["SWJG_DM"] != null)
                {
                    model.SWJG_DM = row["SWJG_DM"].ToString();
                }
                if (row["LRR_DM"] != null)
                {
                    model.LRR_DM = row["LRR_DM"].ToString();
                }
                if (row["LRRQ"] != null && row["LRRQ"].ToString() != "")
                {
                    model.LRRQ = DateTime.Parse(row["LRRQ"].ToString());
                }
                if (row["XGR_DM"] != null)
                {
                    model.XGR_DM = row["XGR_DM"].ToString();
                }
                if (row["XGRQ"] != null && row["XGRQ"].ToString() != "")
                {
                    model.XGRQ = DateTime.Parse(row["XGRQ"].ToString());
                }
                if (row["HDFS_DM"] != null)
                {
                    model.HDFS_DM = row["HDFS_DM"].ToString();
                }
                if (row["DSZ"] != null)
                {
                    model.DSZ = row["DSZ"].ToString();
                }
                if (row["NSRMC_JC"] != null)
                {
                    model.NSRMC_JC = row["NSRMC_JC"].ToString();
                }
                if (row["ZJL"] != null)
                {
                    model.ZJL = row["ZJL"].ToString();
                }
                if (row["QYFR_DM"] != null)
                {
                    model.QYFR_DM = row["QYFR_DM"].ToString();
                }
                if (row["FZDW_MC"] != null)
                {
                    model.FZDW_MC = row["FZDW_MC"].ToString();
                }
                if (row["FZHM"] != null)
                {
                    model.FZHM = row["FZHM"].ToString();
                }
                if (row["JYFS_DM"] != null)
                {
                    model.JYFS_DM = row["JYFS_DM"].ToString();
                }
                if (row["NSRLB_DM"] != null)
                {
                    model.NSRLB_DM = row["NSRLB_DM"].ToString();
                }
                if (row["GDGGBZ"] != null)
                {
                    model.GDGGBZ = row["GDGGBZ"].ToString();
                }
                if (row["KGFS_DM"] != null)
                {
                    model.KGFS_DM = row["KGFS_DM"].ToString();
                }
                if (row["HYDL_DM"] != null)
                {
                    model.HYDL_DM = row["HYDL_DM"].ToString();
                }
                if (row["BF_SJQYXZ_DM"] != null)
                {
                    model.BF_SJQYXZ_DM = row["BF_SJQYXZ_DM"].ToString();
                }
                if (row["NSRMC_YW"] != null)
                {
                    model.NSRMC_YW = row["NSRMC_YW"].ToString();
                }
                if (row["GSHBZ"] != null)
                {
                    model.GSHBZ = row["GSHBZ"].ToString();
                }
                if (row["FRBZ"] != null)
                {
                    model.FRBZ = row["FRBZ"].ToString();
                }
                if (row["ZCDZ"] != null)
                {
                    model.ZCDZ = row["ZCDZ"].ToString();
                }
                if (row["ZCD_YB"] != null)
                {
                    model.ZCD_YB = row["ZCD_YB"].ToString();
                }
                if (row["SCJYD_YB"] != null)
                {
                    model.SCJYD_YB = row["SCJYD_YB"].ToString();
                }
                if (row["DYDZ"] != null)
                {
                    model.DYDZ = row["DYDZ"].ToString();
                }
                if (row["GSKYRQ"] != null && row["GSKYRQ"].ToString() != "")
                {
                    model.GSKYRQ = DateTime.Parse(row["GSKYRQ"].ToString());
                }
                if (row["HSXS_DM"] != null)
                {
                    model.HSXS_DM = row["HSXS_DM"].ToString();
                }
                if (row["BSR_ZJLX_DM"] != null)
                {
                    model.BSR_ZJLX_DM = row["BSR_ZJLX_DM"].ToString();
                }
                if (row["BSR_ZJHM"] != null)
                {
                    model.BSR_ZJHM = row["BSR_ZJHM"].ToString();
                }
                if (row["JSJDJDM"] != null)
                {
                    model.JSJDJDM = row["JSJDJDM"].ToString();
                }
                if (row["GSDJJG_MC"] != null)
                {
                    model.GSDJJG_MC = row["GSDJJG_MC"].ToString();
                }
                if (row["ZZLB_DM"] != null)
                {
                    model.ZZLB_DM = row["ZZLB_DM"].ToString();
                }
                if (row["GSDJZZH"] != null)
                {
                    model.GSDJZZH = row["GSDJZZH"].ToString();
                }
                if (row["YXQ_Q"] != null && row["YXQ_Q"].ToString() != "")
                {
                    model.YXQ_Q = DateTime.Parse(row["YXQ_Q"].ToString());
                }
                if (row["YXQ_Z"] != null && row["YXQ_Z"].ToString() != "")
                {
                    model.YXQ_Z = DateTime.Parse(row["YXQ_Z"].ToString());
                }
                if (row["ZY"] != null)
                {
                    model.ZY = row["ZY"].ToString();
                }
                if (row["JY"] != null)
                {
                    model.JY = row["JY"].ToString();
                }
                if (row["JYFS"] != null)
                {
                    model.JYFS = row["JYFS"].ToString();
                }
                if (row["SCJYQX_Q"] != null && row["SCJYQX_Q"].ToString() != "")
                {
                    model.SCJYQX_Q = DateTime.Parse(row["SCJYQX_Q"].ToString());
                }
                if (row["SCJYQX_Z"] != null && row["SCJYQX_Z"].ToString() != "")
                {
                    model.SCJYQX_Z = DateTime.Parse(row["SCJYQX_Z"].ToString());
                }
                if (row["GSFZRQ"] != null && row["GSFZRQ"].ToString() != "")
                {
                    model.GSFZRQ = DateTime.Parse(row["GSFZRQ"].ToString());
                }
                if (row["ZCZB"] != null && row["ZCZB"].ToString() != "")
                {
                    model.ZCZB = decimal.Parse(row["ZCZB"].ToString());
                }
                if (row["ZCBZ_DM"] != null)
                {
                    model.ZCBZ_DM = row["ZCBZ_DM"].ToString();
                }
                if (row["TZZE"] != null && row["TZZE"].ToString() != "")
                {
                    model.TZZE = decimal.Parse(row["TZZE"].ToString());
                }
                if (row["TZBZ_DM"] != null)
                {
                    model.TZBZ_DM = row["TZBZ_DM"].ToString();
                }
                if (row["CYRS"] != null && row["CYRS"].ToString() != "")
                {
                    model.CYRS = long.Parse(row["CYRS"].ToString());
                }
                if (row["WJRS"] != null && row["WJRS"].ToString() != "")
                {
                    model.WJRS = long.Parse(row["WJRS"].ToString());
                }
                if (row["YZZZ"] != null)
                {
                    model.YZZZ = row["YZZZ"].ToString();
                }
                if (row["ZGDW"] != null)
                {
                    model.ZGDW = row["ZGDW"].ToString();
                }
                if (row["JYFWDW"] != null)
                {
                    model.JYFWDW = row["JYFWDW"].ToString();
                }
                if (row["ZJGYB"] != null)
                {
                    model.ZJGYB = row["ZJGYB"].ToString();
                }
                if (row["PZJG"] != null)
                {
                    model.PZJG = row["PZJG"].ToString();
                }
                if (row["PZWH"] != null)
                {
                    model.PZWH = row["PZWH"].ToString();
                }
                if (row["PZRQ"] != null && row["PZRQ"].ToString() != "")
                {
                    model.PZRQ = DateTime.Parse(row["PZRQ"].ToString());
                }
                if (row["ZHZCQK"] != null)
                {
                    model.ZHZCQK = row["ZHZCQK"].ToString();
                }
                if (row["CJQ_Q"] != null && row["CJQ_Q"].ToString() != "")
                {
                    model.CJQ_Q = DateTime.Parse(row["CJQ_Q"].ToString());
                }
                if (row["CJQ_Z"] != null && row["CJQ_Z"].ToString() != "")
                {
                    model.CJQ_Z = DateTime.Parse(row["CJQ_Z"].ToString());
                }
                if (row["HWCFC"] != null)
                {
                    model.HWCFC = row["HWCFC"].ToString();
                }
                if (row["HWCFDMJ"] != null)
                {
                    model.HWCFDMJ = row["HWCFDMJ"].ToString();
                }
                if (row["CWFZRMC"] != null)
                {
                    model.CWFZRMC = row["CWFZRMC"].ToString();
                }
                if (row["CWBBZL"] != null)
                {
                    model.CWBBZL = row["CWBBZL"].ToString();
                }
                if (row["GDZCZJFS"] != null)
                {
                    model.GDZCZJFS = row["GDZCZJFS"].ToString();
                }
                if (row["YHPTXFF"] != null)
                {
                    model.YHPTXFF = row["YHPTXFF"].ToString();
                }
                if (row["KJND"] != null)
                {
                    model.KJND = row["KJND"].ToString();
                }
                if (row["JZBWB_DM"] != null)
                {
                    model.JZBWB_DM = row["JZBWB_DM"].ToString();
                }
                if (row["JZLB"] != null)
                {
                    model.JZLB = row["JZLB"].ToString();
                }
                if (row["JZFS"] != null)
                {
                    model.JZFS = row["JZFS"].ToString();
                }
                if (row["JZRQ"] != null && row["JZRQ"].ToString() != "")
                {
                    model.JZRQ = int.Parse(row["JZRQ"].ToString());
                }
                if (row["FZRQ"] != null && row["FZRQ"].ToString() != "")
                {
                    model.FZRQ = DateTime.Parse(row["FZRQ"].ToString());
                }
                if (row["FRGJ_DM"] != null)
                {
                    model.FRGJ_DM = row["FRGJ_DM"].ToString();
                }
                if (row["TZFS_DM"] != null)
                {
                    model.TZFS_DM = row["TZFS_DM"].ToString();
                }
                if (row["JYMS_DM"] != null)
                {
                    model.JYMS_DM = row["JYMS_DM"].ToString();
                }
                if (row["HJLX_DM"] != null)
                {
                    model.HJLX_DM = row["HJLX_DM"].ToString();
                }
                if (row["SBDJZH"] != null)
                {
                    model.SBDJZH = row["SBDJZH"].ToString();
                }
                if (row["HYML_DM"] != null)
                {
                    model.HYML_DM = row["HYML_DM"].ToString();
                }
                if (row["ZJFL_DM"] != null)
                {
                    model.ZJFL_DM = row["ZJFL_DM"].ToString();
                }
                if (row["DSBZ"] != null)
                {
                    model.DSBZ = row["DSBZ"].ToString();
                }
                if (row["NSFS_DM"] != null)
                {
                    model.NSFS_DM = row["NSFS_DM"].ToString();
                }
                if (row["FRXB_DM"] != null)
                {
                    model.FRXB_DM = row["FRXB_DM"].ToString();
                }
                if (row["FRZW"] != null)
                {
                    model.FRZW = row["FRZW"].ToString();
                }
                if (row["FRNL"] != null && row["FRNL"].ToString() != "")
                {
                    model.FRNL = int.Parse(row["FRNL"].ToString());
                }
                if (row["FRDH"] != null)
                {
                    model.FRDH = row["FRDH"].ToString();
                }
                if (row["CWFZRXB_DM"] != null)
                {
                    model.CWFZRXB_DM = row["CWFZRXB_DM"].ToString();
                }
                if (row["CWFZRZW"] != null)
                {
                    model.CWFZRZW = row["CWFZRZW"].ToString();
                }
                if (row["CWFZRNL"] != null && row["CWFZRNL"].ToString() != "")
                {
                    model.CWFZRNL = int.Parse(row["CWFZRNL"].ToString());
                }
                if (row["CWFZRDH"] != null)
                {
                    model.CWFZRDH = row["CWFZRDH"].ToString();
                }
                if (row["CWFZRSFHM"] != null)
                {
                    model.CWFZRSFHM = row["CWFZRSFHM"].ToString();
                }
                if (row["BSRYXB_DM"] != null)
                {
                    model.BSRYXB_DM = row["BSRYXB_DM"].ToString();
                }
                if (row["BSRYZW"] != null)
                {
                    model.BSRYZW = row["BSRYZW"].ToString();
                }
                if (row["BSRYNL"] != null && row["BSRYNL"].ToString() != "")
                {
                    model.BSRYNL = int.Parse(row["BSRYNL"].ToString());
                }
                if (row["BSRYDH"] != null)
                {
                    model.BSRYDH = row["BSRYDH"].ToString();
                }
                if (row["DWXZ"] != null)
                {
                    model.DWXZ = row["DWXZ"].ToString();
                }
                if (row["WANGZHI"] != null)
                {
                    model.WANGZHI = row["WANGZHI"].ToString();
                }
                if (row["FRGJ_DZ"] != null)
                {
                    model.FRGJ_DZ = row["FRGJ_DZ"].ToString();
                }
                if (row["ZCD_DHHM"] != null)
                {
                    model.ZCD_DHHM = row["ZCD_DHHM"].ToString();
                }
                if (row["SCD_DHHM"] != null)
                {
                    model.SCD_DHHM = row["SCD_DHHM"].ToString();
                }
                if (row["HHR_ZS"] != null && row["HHR_ZS"].ToString() != "")
                {
                    model.HHR_ZS = long.Parse(row["HHR_ZS"].ToString());
                }
                if (row["FR_YDDHHM"] != null)
                {
                    model.FR_YDDHHM = row["FR_YDDHHM"].ToString();
                }
                if (row["BSR_YDDHHM"] != null)
                {
                    model.BSR_YDDHHM = row["BSR_YDDHHM"].ToString();
                }
                if (row["BSR_DYDZ"] != null)
                {
                    model.BSR_DYDZ = row["BSR_DYDZ"].ToString();
                }
                if (row["CW_YDDHHM"] != null)
                {
                    model.CW_YDDHHM = row["CW_YDDHHM"].ToString();
                }
                if (row["CW_ZJLX_DM"] != null)
                {
                    model.CW_ZJLX_DM = row["CW_ZJLX_DM"].ToString();
                }
                if (row["CW_DYDZ"] != null)
                {
                    model.CW_DYDZ = row["CW_DYDZ"].ToString();
                }
                if (row["SWDLR_MC"] != null)
                {
                    model.SWDLR_MC = row["SWDLR_MC"].ToString();
                }
                if (row["SWDLR_SBH"] != null)
                {
                    model.SWDLR_SBH = row["SWDLR_SBH"].ToString();
                }
                if (row["SWDLR_DHHM"] != null)
                {
                    model.SWDLR_DHHM = row["SWDLR_DHHM"].ToString();
                }
                if (row["SWDLR_DYDZ"] != null)
                {
                    model.SWDLR_DYDZ = row["SWDLR_DYDZ"].ToString();
                }
                if (row["ZRRTZBL"] != null && row["ZRRTZBL"].ToString() != "")
                {
                    model.ZRRTZBL = decimal.Parse(row["ZRRTZBL"].ToString());
                }
                if (row["WZTZBL"] != null && row["WZTZBL"].ToString() != "")
                {
                    model.WZTZBL = decimal.Parse(row["WZTZBL"].ToString());
                }
                if (row["GYTZBL"] != null && row["GYTZBL"].ToString() != "")
                {
                    model.GYTZBL = decimal.Parse(row["GYTZBL"].ToString());
                }
                if (row["HYDLB_DM"] != null)
                {
                    model.HYDLB_DM = row["HYDLB_DM"].ToString();
                }
                if (row["HYDLC_DM"] != null)
                {
                    model.HYDLC_DM = row["HYDLC_DM"].ToString();
                }
                if (row["HYDLD_DM"] != null)
                {
                    model.HYDLD_DM = row["HYDLD_DM"].ToString();
                }
                if (row["HYB_DM"] != null)
                {
                    model.HYB_DM = row["HYB_DM"].ToString();
                }
                if (row["HYC_DM"] != null)
                {
                    model.HYC_DM = row["HYC_DM"].ToString();
                }
                if (row["HYD_DM"] != null)
                {
                    model.HYD_DM = row["HYD_DM"].ToString();
                }
                if (row["LSNSRLX_DM"] != null)
                {
                    model.LSNSRLX_DM = row["LSNSRLX_DM"].ToString();
                }
                if (row["LSNSR_YXQ"] != null)
                {
                    model.LSNSR_YXQ = row["LSNSR_YXQ"].ToString();
                }
                if (row["ZCZB_ZE"] != null && row["ZCZB_ZE"].ToString() != "")
                {
                    model.ZCZB_ZE = decimal.Parse(row["ZCZB_ZE"].ToString());
                }
                if (row["ZCZBB"] != null && row["ZCZBB"].ToString() != "")
                {
                    model.ZCZBB = decimal.Parse(row["ZCZBB"].ToString());
                }
                if (row["ZCBZB_DM"] != null)
                {
                    model.ZCBZB_DM = row["ZCBZB_DM"].ToString();
                }
                if (row["ZCZBC"] != null && row["ZCZBC"].ToString() != "")
                {
                    model.ZCZBC = decimal.Parse(row["ZCZBC"].ToString());
                }
                if (row["ZCBZC_DM"] != null)
                {
                    model.ZCBZC_DM = row["ZCBZC_DM"].ToString();
                }
                if (row["KHDJZH"] != null)
                {
                    model.KHDJZH = row["KHDJZH"].ToString();
                }
                if (row["DJZFZRQ"] != null && row["DJZFZRQ"].ToString() != "")
                {
                    model.DJZFZRQ = DateTime.Parse(row["DJZFZRQ"].ToString());
                }
                if (row["WCBYY_DM"] != null)
                {
                    model.WCBYY_DM = row["WCBYY_DM"].ToString();
                }
                if (row["QYTSBZ_DM"] != null)
                {
                    model.QYTSBZ_DM = row["QYTSBZ_DM"].ToString();
                }
                if (row["DLFQ_DM"] != null)
                {
                    model.DLFQ_DM = row["DLFQ_DM"].ToString();
                }
                if (row["DAH"] != null)
                {
                    model.DAH = row["DAH"].ToString();
                }
                if (row["PQ_DM"] != null && row["PQ_DM"].ToString() != "")
                {
                    model.PQ_DM = decimal.Parse(row["PQ_DM"].ToString());
                }
                if (row["NSRTSZTLX_DM"] != null)
                {
                    model.NSRTSZTLX_DM = row["NSRTSZTLX_DM"].ToString();
                }
                if (row["ZFXYH"] != null)
                {
                    model.ZFXYH = row["ZFXYH"].ToString();
                }
                if (row["QXSDSGXJG"] != null)
                {
                    model.QXSDSGXJG = row["QXSDSGXJG"].ToString();
                }
                if (row["BY_NSRSBH"] != null)
                {
                    model.BY_NSRSBH = row["BY_NSRSBH"].ToString();
                }
                if (row["GS_NSRSBH"] != null)
                {
                    model.GS_NSRSBH = row["GS_NSRSBH"].ToString();
                }
                if (row["GS_NSRMC"] != null)
                {
                    model.GS_NSRMC = row["GS_NSRMC"].ToString();
                }
                if (row.Table.Columns.Contains("FEnterprisePropName"))
                {
                    if (row["FEnterprisePropName"] != null)
                    {
                        model.FEnterprisePropName = row["FEnterprisePropName"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FFinancePropName"))
                {
                    if (row["FFinancePropName"] != null)
                    {
                        model.FFinancePropName = row["FFinancePropName"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FEnterprisePropNo"))
                {
                    if (row["FEnterprisePropNo"] != null)
                    {
                        model.FEnterprisePropNo = row["FEnterprisePropNo"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FFinancePropNo"))
                {
                    if (row["FFinancePropNo"] != null)
                    {
                        model.FFinancePropNo = row["FFinancePropNo"].ToString();
                    }
                }
            }
            return model;
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public string GetFDDBRMC(string NSRDZDAH)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(" SELECT FDDBRMC FROM fund.V_DJ_NSRXX WHERE NSRDZDAH='" + NSRDZDAH + "' ");
            object obj = DbHelperSQL.GetSingle(strSql.ToString());
            if (obj != null)
            {
                return obj.ToString();
            }
            else
            {
                return "";
            }
        }

        

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,Q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DLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH,GS_NSRSBH,GS_NSRMC ");
            strSql.Append(" FROM fund.V_DJ_NSRXX ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" NSRDZDAH,WSPZXH,NSRSBH,NSRBM,NSRMC,FDDBRMC,FRZJLX_DM,ZJHM,SCJYDZ,BSRMC,DHHM,LSGX_DM,HY_DM,DJZCLX_DM,HZDJRQ,QYKJZD_DM,SWDJBLX_DM,SWDJZLX_DM,NSRZT_DM,ZGSWRY_DM,JDXZ_DM,ZZSNSRLX_DM,GSYLB_DM,NSRXYDJ_DM,QYGM_DM,CYLX_DM,XZQH_YSFPBL_DM,HGDM,ZJG_BZ,NSR_SWJG_DM,SWJG_DM,LRR_DM,LRRQ,XGR_DM,XGRQ,HDFS_DM,DSZ,NSRMC_JC,ZJL,QYFR_DM,FZDW_MC,FZHM,JYFS_DM,NSRLB_DM,GDGGBZ,KGFS_DM,HYDL_DM,BF_SJQYXZ_DM,NSRMC_YW,GSHBZ,FRBZ,ZCDZ,ZCD_YB,SCJYD_YB,DYDZ,GSKYRQ,HSXS_DM,BSR_ZJLX_DM,BSR_ZJHM,JSJDJDM,GSDJJG_MC,ZZLB_DM,GSDJZZH,YXQ_Q,YXQ_Z,ZY,JY,JYFS,SCJYQX_Q,SCJYQX_Z,GSFZRQ,ZCZB,ZCBZ_DM,TZZE,TZBZ_DM,CYRS,WJRS,YZZZ,ZGDW,JYFWDW,ZJGYB,PZJG,PZWH,PZRQ,ZHZCQK,CJQ_Q,CJQ_Z,HWCFC,HWCFDMJ,CWFZRMC,CWBBZL,GDZCZJFS,YHPTXFF,KJND,JZBWB_DM,JZLB,JZFS,JZRQ,FZRQ,FRGJ_DM,TZFS_DM,JYMS_DM,HJLX_DM,SBDJZH,HYML_DM,ZJFL_DM,DSBZ,NSFS_DM,FRXB_DM,FRZW,FRNL,FRDH,CWFZRXB_DM,CWFZRZW,CWFZRNL,CWFZRDH,CWFZRSFHM,BSRYXB_DM,BSRYZW,BSRYNL,BSRYDH,DWXZ,WANGZHI,FRGJ_DZ,ZCD_DHHM,SCD_DHHM,HHR_ZS,FR_YDDHHM,BSR_YDDHHM,BSR_DYDZ,CW_YDDHHM,CW_ZJLX_DM,CW_DYDZ,SWDLR_MC,SWDLR_SBH,SWDLR_DHHM,SWDLR_DYDZ,ZRRTZBL,WZTZBL,GYTZBL,HYDLB_DM,HYDLC_DM,HYDLD_DM,HYB_DM,HYC_DM,HYD_DM,LSNSRLX_DM,LSNSR_YXQ,ZCZB_ZE,ZCZBB,ZCBZB_DM,ZCZBC,ZCBZC_DM,KHDJZH,DJZFZRQ,WCBYY_DM,QYTSBZ_DM,DLFQ_DM,DAH,PQ_DM,NSRTSZTLX_DM,ZFXYH,QXSDSGXJG,BY_NSRSBH,GS_NSRSBH,GS_NSRMC ");
            strSql.Append(" FROM fund.V_DJ_NSRXX ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return DbHelperSQL.Query(strSql.ToString());
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        public int GetRecordCount(string strWhere,string fYear)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) FROM fund.fn_DJ_NSRXX(" + fYear + ") ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            object obj = DbHelperSQL.GetSingle(strSql.ToString());
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("SELECT * FROM ( ");
            strSql.Append(" SELECT ROW_NUMBER() OVER (");
            if (!string.IsNullOrEmpty(orderby.Trim()))
            {
                strSql.Append("order by T." + orderby);
            }
            else
            {
                strSql.Append("order by T.NSRDZDAH desc");
            }
            strSql.Append(")AS Row, T.*  from fund.V_DJ_NSRXX T ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            strSql.Append(" ) TT");
            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
            return DbHelperSQL.Query(strSql.ToString());
        }



        /// <summary>
        /// 获取审核数据
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="strWhere"></param>
        /// <param name="fOrderFiled"></param>
        /// <returns></returns>
        public DataSet GetDataforAudit(string beginDate, string endDate, string Year, string NSRDZDAH)
        {

            SqlParameter[] parameters = {
                    new SqlParameter("@beginDate", SqlDbType.DateTime),
                    new SqlParameter("@endDate", SqlDbType.DateTime),
                    new SqlParameter("@Year", SqlDbType.Decimal,4),
                    new SqlParameter("@NSRBM", SqlDbType.NVarChar,20)
                    };
            parameters[0].Value = beginDate;
            parameters[1].Value = endDate;
            parameters[2].Value = Year;
            parameters[3].Value = NSRDZDAH;

            DataSet ds = DbHelperSQL.RunProcedure("[fund].[sp_GetDataforAudit]", parameters, "ds", 60 * 30);

            return ds;
        }

        #endregion  BasicMethod
        #region  ExtensionMethod

        #endregion  ExtensionMethod
    }
}

